IanS
Hi all,
I'm trying to connect to generic Modbus TCP device via TCP_Connect\send\receive blocks but it fails on compiling stage when uploading *.st file to the softPLC. I tried both my own app and the app from examples. No success.
The following errors appeared:
./st_files/466945.st:3-20..3-30: error: invalid specification in variable declaration.
./st_files/466945.st:9-17..9-24: error: invalid specification in variable declaration.
./st_files/466945.st:10-20..10-30: error: invalid specification in variable declaration.
Each string is associated with a var definition accordingly:
TCP_Connect0 : TCP_CONNECT;
TCP_Receive0 : TCP_RECEIVE;
TCP_Send1 : TCP_SEND;
Another type of error:
./st_files/466945.st:31-15..31-18: error: invalid variable before ':=' in ST assignment statement.
./st_files/466945.st:31-25..31-27: error: ';' missing at the end of statement in ST statement.
./st_files/466945.st:31-27..31-35: error: invalid variable before ':=' in ST assignment statement.
./st_files/466945.st:31-52..31-54: error: ';' missing at the end of statement in ST statement.
./st_files/466945.st:31-54..31-65: error: invalid variable before ':=' in ST assignment statement.
./st_files/466945.st:31-79..31-81: error: ';' missing at the end of statement in ST statement.
./st_files/466945.st:31-81..31-86: error: invalid variable before ':=' in ST assignment statement.
./st_files/466945.st:31-92..31-93: error: ';' missing at the end of statement in ST statement.
./st_files/466945.st:31-93..31-93: error: invalid statement in ST statement.
associated with this line:
TCP_Connect0(EN := TRUE, CONNECT := NOT(connected), IP_ADDRESS := '10.0.0.11', PORT := 502);
etc...

It seems like communication library is not connected properly. Any ideas how to fix that?

P.S. I tried to establish communication with the device using slave devices. And it works. But the goal is to use event driven  logic.
Reply 0 0
thiagoralves
Update your runtime to the latest version. The version you have does not support TCP blocks
Reply 1 0
IanS
Thanks,  now it works.
Reply 0 0
Reply