Disconnect/Reconnect InTouch to OmniServer during Runtime
I need to reinitialize one of my InTouch topics that is connecting to OmniServer. I have tried the "Reinitialize I/O" command from the "Special" menu in WindowViewer, but this doesn't appear to make a difference. How do I disconnect and reconnect without having to restart either InTouch or OmniServer?
The "Reinitialize I/O" command in WindowViewer does not appear to actual disconnect and reconnect from the server to which it is connected. There is a workaround that will allow you to reinitialize your OmniServer topic without having to restart either application.
- Create an additional topic in OmniServer, associating the same protocol that you are using for the valid topic and leaving the Device at "None".
- In InTouch WindowMaker, create two buttons on the desired window.
- For the 1st button, you will need to associate a Touch Pushbutton Action, which will use an InTouch script.
- The necessary script is:
IOSetAccessName("AccessName", "NodeName", "ApplicationName", "TopicName")- AccessName - the Access Name that contains the Topic you would like to reinitialize.
- NodeName - the Node Name where OmniServer is located. Enter "" to keep the current name.
- ApplicationName - the Application Name for OmniServer. "osrvpoll" for Suitelink, "osrvdde" for DDE.
- TopicName - the name of the additional topic you created in OmniServer.
- The necessary script is:
- For the 2nd button, you will also need to associate a Touch Pushbutton Action, which will use the same InTouch script.
- AccessName - the same Access Name used in the script for the 1st button.
- NodeName - also the same, so just enter "".
- ApplicationName - the same Application Name used in the script for the 1st button.
- TopicName" - the name of the valid topic you need to reinitialize.
Now, during runtime, if you click the 1st button created, InTouch will disconnect from your valid topic and connect to the other topic. Since there is not a valid device defined for that topic, no communications will occur. The values of any items in InTouch associated with your valid topic will retain their previous value.
To reconnect to your valid topic, then just click the 2nd button you created. This will have the effect of re-initializing the connection to your valid OmniServer topic.