Get data from rs-232 devices and write into FTP

Dear Friends,

My application is as follows. I’m using Q24+ based modem.

I want to connect the Rs-232 port of modem to the Modbus slave device.
Using MODBUS RTU protocol I need to read/write from/to the device.
MODBUS RTU protocol is just a request-reply kind of protocol. We send a frame (string of hex characters) to device. The device replies in the same format.
For example,
Request frame is sent to 02 03 00 01 00 08 15 FF
The description of bytes in the above frame:
02 = Salve Address
03 = Function Code
00 01 = 1 = Start Address of Data Registers
00 08 = 8 = Number of Data Registers
15 FF = CRC value
The reply given from slave device:
02 03 10 01 32 3F 2A 07 D9 00 03 00 0F 00 0D 00 20 00 2D FF BF
The description of the bytes:
02 = Slave Address
03 = Function Code
10 = 16 (Decimal) = Data Count in Decimal. Here its 8 registers of 16 bit (2 bytes each)
i.e. 16 values of 8 bits (1 byte)
Each data value coupies 2 bytes
01 32 = 306
3F 2A = 16170
07 D9 = 2009
00 03 = 3
00 0F = 15
00 0D = 13
00 20 = 32
00 2D = 45
FF BF = 65471 CRC Value

Like this I’ll send N number of requests and get N number of replies.

I want to extract the data values (in this example: 306,16170,2009,3,15,13,32,45) and store into flash memory of Q24+ in the following method.
Let’s say there are 10 requests and 10 replies, there will be 10x8=80 data values.
I want to store all these 80 values temporarily in flash memory of Q24+. Once we get all 10 replies, these 80 values are to be written into .csv file which is kept in FTP server. This process will be cyclic. I.e. Once data has been uploaded to FTP, it starts 1st query again.

In addition to this I want to store the uploaded data in non-volatile memory of Q24+ every one hour.

Can anyone help me ?

When posting the same question in multiple forums, you should include cross-references - so that people can keep track of the whole story: viewtopic.php?f=15&t=3357

As far as FTP is concerned, the source of the data is irrelevant. So, from that point of view, this is no different to any other FTP application.

Study the FTP section in the WIP User Guide.