CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

Network variables - problem setting variables
https://forum.codesys.com/viewtopic.php?f=11&t=7599
Page 1 of 1

Author:  frankiPL [ Sat Feb 18, 2017 3:07 pm ]
Post subject:  Network variables - problem setting variables

Hi

I'm communicating from my application with PLC controller over Network Variables.
It works fine when I'm setting single variable, but I have problem when I want set 4 variables
BOOL,BYTE,BYTE,BYTE
My telegram looks like this:
00 2d 53 33 00 00 00 00 01 00 5f 00 04 00 18 00 30 00 00 00 01 64 64 64
cob_id = 1
position of first variable= 5f (95)
num of variables = 4
length (header & data) = 18 (24)
counter = 30 (48)
payload = 01 64 64 64 (TRUE,100,100,100)

After I send this telegram, there is no answer and in NetVarPDO_RX_Diagnosis_UDP on position 95 there is error:
NetVarUDPError_Layout

What am I doing wrong?
How can I change 4 variables with one telegram?
Not Possible and I need to send 4 telegrams, one for each variable ?
Or use "Pack variables" and send all variables always?

Best Regards
Marek

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/