I have some specific questions regarding how the OPC server is working behind the scenes and the recommend methods for scripting when reading/writing OPC tags.
- Is the sample handshake analysis below correct?
tag.read/writewill read/write values from the OPC server, whereas
system.opc.readValue/writeValuewill force interaction with the data source (opc server connection) - is this accurate?
- How can you 100% guarantee data in
system.tag.readis accurate - or is the only guarantee
system.opc.readValue? Is it normal to see people exclusively using
- Is there a list of OPC best practices that IA has compiled over the years?
The OPC server scans for updated information and based on the scans, updates its internal OPC server memory map.
Ignition and the
system.tag.read/write commands interface with the block of memory stored on the OPC server - increasing the systems speed - but since actions are async so there is no guarantee that the event actually occurs. So if the handshake shown below was implemented, it would fail some times (or every time). Because at step 6,
ACK_Complete is low, getting set to high, IA will write the bit and immediately look for it to be low (step 9). It will start looking for a low bit prior to the PLC doing any action. Sometimes the handshake will work, other times it won’t (probably won’t?).