I’m trying to write a command to re-enable my I/O units that become disabled for unknown reasons. That way I don’t have to manually open the I/O units folder, and change the status from “disabled” to “enabled” for the individual controllers (image).
Currently, my script will stop/start the strategy but that is too aggressive and requires the machine to be down.
Here is what I have:
sTransmitBuffer = “_END _RUN” + Chr(13);
//Repeat the following for each controller to restart.
SetCommunicationHandleValue(“tcp:172.27.72.30:22001”, comm); //put the controller to restart IP address in here
status = OpenOutgoingCommunication(comm);
status = TransmitReceiveString(sTransmitBuffer, comm, sReceiveBuffer); //sReceiveBuffer will have a couple nulls in it
status = CloseCommunication(comm);