msi124 Member M Join Date Mar 2014 Location Touchet Posts 5 Dec 9, 2014 #1 Hi all. Is it possible in Crimson 3 to assign a value to a tag depending on if a PLC is off-line and unreachable or on-line and reachable. All of the PLCs are communicating by Ethernet with a Data Station Plus. Thanks.
Hi all. Is it possible in Crimson 3 to assign a value to a tag depending on if a PLC is off-line and unreachable or on-line and reachable. All of the PLCs are communicating by Ethernet with a Data Station Plus. Thanks.
keshik Lifetime Supporting Member K Join Date Jun 2011 Location Portland, OR Posts 408 Dec 10, 2014 #2 Create a program. Use the "IsDeviceOnline()" function to tell if you can communicate with the external device. For example (assuming the PLC is device 1): Code: if (IsDeviceOnline(1)) { // communications ok myVar = 1; } else { // no communications with PLC myVar = 2; } The device number for the PLC can be found on the communications tab in the bottom left corner (I think) when you highlight the device name. EDIT: Creating a program isn't necessarily required as it can be done a few ways without explicitly creating one.
Create a program. Use the "IsDeviceOnline()" function to tell if you can communicate with the external device. For example (assuming the PLC is device 1): Code: if (IsDeviceOnline(1)) { // communications ok myVar = 1; } else { // no communications with PLC myVar = 2; } The device number for the PLC can be found on the communications tab in the bottom left corner (I think) when you highlight the device name. EDIT: Creating a program isn't necessarily required as it can be done a few ways without explicitly creating one.
keshik Lifetime Supporting Member K Join Date Jun 2011 Location Portland, OR Posts 408 Dec 10, 2014 #4 You're welcome. It's nice to see questions that I have an answer for