S7-300 and CP340

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Post Reply
Guest

S7-300 and CP340

Post by Guest »

Hi,
I am new with Simens PLC. I use S7-312C CPU and CP340 RS422/485 communication processor.I need to create a FB for examle FB 5, for send message frame via CP340 using ASCII protocol. Data for send is in for example DB5 as ARRAY of CHAR. As input parameter in FB 5 it is need 2 char for adress and 4 char for data. That will be store in DB5. Than one char @ will be in front as start char, so message will be @aaddddcc*<CR>,@ for start, aa 2 char adress, dddd 4 char data, cc CRC from all above, and * and <CR> 2 end char. I just need to enter as input parameter of FB 5 aa and dddd and message will be compose as I show above as sequence of 11 char and send.Thanks a lot.
Post Reply