Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hello,
I have Simulated Tags. The values from Thingworx are sent/written to the Simulated Tags. These simulated tags are used in Derived Tags to Calculate and send to Thingworx.
But when KepServerEx is Re-Initialized, the simulated Tags become 0. Therefore, Derived Tag values are wrong.
How can I prevent simulated Tags from becoming zero whenever KepServerEX is reinitialized?
Thanks,
Solved! Go to Solution.
So,
Thanks, @mattroy; as @mattroy suggested using a memory driver in place of Simulated Tags helped.
Secondly, for our use case, item persistence needs to be enabled for that to work, and the persistence file will only be written on a clean shutdown/reinitialization of the runtime, defined in the channel properties of the Memory driver.
Thanks,
Hello Shashi,
If you are using the Simulator driver, setting “Item Persistence” to Enabled under Channel > Properties > Persistence will retain the values through a Reinitialize operation. However, this option is not available if you are using a communication driver such as Modbus or ControlLogix and have the device in Simulated mode (under Device > Properties > General > Simulated). When the Simulated property is set to Yes, the server will not poll the device and instead will set the quality to Good and zero the values. These values will always be reset after reinitializing.
Simulated mode on a device driver is typically not used for advanced simulations. For that purpose, use the Simulator driver and enable Item Persistence.
I hope this helps.
Thanks,
Matt
So,
Thanks, @mattroy; as @mattroy suggested using a memory driver in place of Simulated Tags helped.
Secondly, for our use case, item persistence needs to be enabled for that to work, and the persistence file will only be written on a clean shutdown/reinitialization of the runtime, defined in the channel properties of the Memory driver.
Thanks,