Technical Forum

Communication / Networks

Which protocol I will select if I need to send HEX data

Thread Starter: myo2011   Started: 8/12/2012 9:59 AM   Replies: 4

« Previous thread Next thread »
Page 1 of 1 (5 items)
  8/12/2012, 9:59 AM
Joined 9/8/2011
Last visit: 4/30/2013
Posts: 13
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Dear Expert

I need to send HEX data via CP341 CPU315-2DP But I don't know which protocol I will select it
my data is 010300A10020 in HEX format
Protocol in CP341 are

- 3964(R)
- RK512
- ASCII
- PRINTER
- MODBUS Master
- MODBUS Slave

Thanks for your answer

Attachment: mod.GIF  (6 Downloads)

Top
  8/12/2012, 11:04 AM
Joined 2/17/2009
Last visit: 5/22/2013
Posts: 320
Rating:
Rated: Excellent [4.28 out of 5 / rated 25 time(s)]. (25) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Greetings

HEX is just a format of this data; in DEC this is 1112407080992, in OCT is 20140050200040, and in binary is 10000001100000000101000010000000000100000. It is a different representation of the same data.

Your question about protocol depends on the devices you will communicate with. Where do you send this data?

Best regards
Top
  8/13/2012, 7:01 PM
Joined 9/8/2011
Last visit: 4/30/2013
Posts: 13
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello fbelic

I want to send Modbus RTU format to anather device via CP341 - RS485 or RS422 this data is

01 = Address
03 = Function code
00 A1 00 20 = Data
8E = CRC16

I want to know how I can send that data to my device partner without Modbus master

Regards




Top
  8/13/2012, 8:08 PM
Joined 2/17/2009
Last visit: 5/22/2013
Posts: 320
Rating:
Rated: Excellent [4.28 out of 5 / rated 25 time(s)]. (25) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Greetings

Actually, you don't want only to send data, because Function code 03 you are using is used to read output registers of Modbus slave, 32 words starting at register 161. So you will also need to read the response from this slave.

I don't have experience with CP341, but I used ET200S SI module, and it should be similar. You first need to send this you have data using FB3 (S_SEND_SI) - this is request to read. After this FB signal it is DONE, you need to call FB2 (S_RECV_SI) to read the response and place it in some DB.

Maybe CP341 uses different function, but procedure should be the same. Check this manual for more info: http://support.automation.siemens.com/WW/view/en/25362836

Best regards
Top
  8/15/2012, 4:55 PM
Joined 9/8/2011
Last visit: 4/30/2013
Posts: 13
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Thank you so much
Top
Thank you for this post from:
Page 1 of 1 (5 items)
Actions