Hello,
I am using the WriteRaw method to write to a UDT in one go. The UDT consists of a single element of type REAL.
The WriteRaw method does not throw an error, but to check to see if the value was actually written, I call ReadRaw immediately afterwards; however, ReadRaw always returns the former value - as if WriteRaw was completely ignored.
I have tried the following, but to no avail:
- Switch the controller to PROG mode (it's in MEM mode by default).
- Wait 10ms to 10s before calling ReadRaw
Here is the partial code I am using to write to the UDT:
byte[] newValue = BitConverter.GetBytes(100.0f);
clxClient.WriteRaw(tag.TagName, 0, newValue);
I have also noticed that passing anything other than 0 in the second parameter ("numberOfElements") in WriteRaw throws an exception. Is it safe to assume that this is the offset of the byte array (the third parameter)?
Many thanks!