FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
2 weeks ago
I am using datalayer library to consume the data from PLC. But once PLC is shutdown and repower, the subscribe pipe line will break down. I can/t receive the subscribe data. And the connection state from datalayer is still connected.
So how to detect shutdown event and triggle reconnect action.
2 weeks ago - last edited 2 weeks ago
Hello ,
could you please expand the description about the calling application a bit (SDK, Nodered, ?)
Thanks!
Do you know these states to check?
Bye
2 weeks ago
For example, in node red, you can see the node state is still authenticated, but the virtual environment already stopped.
So how to get the Ctrlx PLC state and monitor the shutdown the event?
2 weeks ago - last edited 2 weeks ago
As the READ node in your picture above is event driven you would have to trigger it again to get a response that provider is not longer available. If you are using subscription you should automatically get a message that connection timed out. Feel free to have a look to our Node-RED examples that are part of the node-red-contrib-ctrlx-automation.
2 weeks ago
It works sometimes, but not for each time.
Is it related to the virtual environment?
2 weeks ago
When I redeploy the node red project, subscribe status turns to failed
2 weeks ago - last edited 2 weeks ago
Are the subscription nodes to the localhost? In other words, is Node-RED running on the VirtualControl that is offline? In this case, Node-RED would be completely unresponsive.
If not, check your error interval and keep alive interval on the subscriptions.
2 weeks ago
No, node red is not running on the virtual machine, it is running on the localhost.(A standart node red instance)
2 weeks ago
I use the default configuration.
2 weeks ago
By default, this will only check the subscription connection once per 60s. Try reducing this to 10s and trying again. In this case, you should wait a maximum of 10s after the control goes offline for an error message.
2 weeks ago
I find there is a rule, when double click the stop button, the connection state won't be updated.
But when I click the stop button for one time, when the virtual environment turns offline, the state below node will also be updated(to subscribed failed).
The ctrlx works version is ctrlX WORKS WRK-V-0120.2.
It is so interesting.
a week ago
Beware that clicking stop once will shutdown the ctrlX COREvirtual ending all processes properly. When clicking twice the emulation will be killed, like as holding shutdown button on a PC or removing power.
a week ago
If I use standalone node-red project to subscribe a variable from the real ctrlx PLC. What will happens if I power off the ctrl PLC instead of stoping it in ctrlx works. Will the subscribe status turns to failed or stay the same just as I double click the stop button in virtual test environment?
Because, when I use CtrlxCore library to connect ctrlx PLC and subscribe the data, when PLC is powered off, my connect status won't change.
What't the reason for it?
a week ago - last edited a week ago
As I do not get your last sentence and complete topology completely, could you please confirm my summary:
A Node-RED installation on a PC is used and there our node-red-contrib-ctrlx-automation library to subscribe to data on a ctrlX CORE connected that PC. When switching off the ctrlX COREs power supply, the subscription node does not react to this, even if you lowered the timeout settings mentioned above?