Applies To: |
|
Summary: |
Pre V7 the following code will increment a tag of data type INT to 32767 and then roll-over and start counting upwards from -32767. FUNCTION myfunction() |
Solution: |
The behaviour has changed in V7. Citect now checks the value being written to see if it is within the range of the tag's type. The write will fail if it is not. Pre v7 Citect used to cast the value down to fit the tag's type (from 32768 to -32767). Therefore, the code should be modified as follows: FUNCTION myfunction() |
Keywords: |
Related Links
Attachments