Skip to main content
pshashipreetham
18-Opal
18-Opal
December 26, 2022
Solved

KepServerEX Simulated Tags values becomes 0 on Re-Initialization

  • December 26, 2022
  • 2 replies
  • 1952 views

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,

Best answer by pshashipreetham

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.

Shashi_Preetham_0-1672546951750.png


Thanks,

2 replies

7-Bedrock
December 30, 2022

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

pshashipreetham
18-Opal
pshashipreetham18-OpalAuthorAnswer
18-Opal
January 1, 2023

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.

Shashi_Preetham_0-1672546951750.png


Thanks,