namboothiripad.mbs
Member
Hi,
I want to communicate with S7 over TCP/IP from PC using standard Ethernet card. I could read and write S7 Memory locations using Libnodave library using VB program.
Then I came across the Fetch/Write software in VB, which communicates with S7-x43-1 card, after configuring Fetch channel in the said card. The program works fine for Marker variables (MB,MW etc) but when I tried to get DB variables, I get some values which do not match with the values shown in S7 (VAT table).
When I request n bytes from a DB, it sends 2n bytes. This is probably, the Fetch Passive uses S5 mode of communication and DBs are word addressable. I tried to make the word address as half of the byte address of the DB, but the value is always different from that shown in VAT. Could not find any correspondance with the individual bytes. (Lest it is a question of Endian..)
If anybody has used the communication for Fetch from S7 using a VB program in PC, kindly help.
( I want to read a few values - 6 real values- from the PLC at 500 ms or so, and send collected data at the end of a cyclic operation which lasts 90-120 secs. The FTP will be max once in 3 minutes).
I want to communicate with S7 over TCP/IP from PC using standard Ethernet card. I could read and write S7 Memory locations using Libnodave library using VB program.
Then I came across the Fetch/Write software in VB, which communicates with S7-x43-1 card, after configuring Fetch channel in the said card. The program works fine for Marker variables (MB,MW etc) but when I tried to get DB variables, I get some values which do not match with the values shown in S7 (VAT table).
When I request n bytes from a DB, it sends 2n bytes. This is probably, the Fetch Passive uses S5 mode of communication and DBs are word addressable. I tried to make the word address as half of the byte address of the DB, but the value is always different from that shown in VAT. Could not find any correspondance with the individual bytes. (Lest it is a question of Endian..)
If anybody has used the communication for Fetch from S7 using a VB program in PC, kindly help.
( I want to read a few values - 6 real values- from the PLC at 500 ms or so, and send collected data at the end of a cyclic operation which lasts 90-120 secs. The FTP will be max once in 3 minutes).