some tags are not refreshing on DskDevice IO Device

Hi All,

I cant figure out why some tags doesnt refresh.

I am reading an ION meter via modbus tcp, and Total Power data is coming on 2 registers. So, in variable tags i have one for High Value Register and other tag for the Low Value register. and via cicode i make the calculation formula Value=High Value * 65536 + Low Value. I have other variable tag on DskDevice L15 named Value. but this isnot refreshing while on runtime. also if i make other text with the same expression tag "Value=High Value * 65536 + Low Value".

could someone help me please

Parents
  • How do you trigger your cicode function containing the formula? Just defining it is not enough, you need to call it periodically.
    To do this you could define an event that calls your function every second or something like that.
    Does your function update the disk tag correct if you call your function manually (from a button for example)?

    And if you use citect 2016 or higher, please take a look at Calculated Variables. This functionality could do exactly what you want, just by defining a Cicode I/O Decvice and filling in your formula in the address field of a variable tag.

    Regards,
    Patrick
Reply
  • How do you trigger your cicode function containing the formula? Just defining it is not enough, you need to call it periodically.
    To do this you could define an event that calls your function every second or something like that.
    Does your function update the disk tag correct if you call your function manually (from a button for example)?

    And if you use citect 2016 or higher, please take a look at Calculated Variables. This functionality could do exactly what you want, just by defining a Cicode I/O Decvice and filling in your formula in the address field of a variable tag.

    Regards,
    Patrick
Children
No Data