cancel
Showing results for 
Search instead for 
Did you mean: 

CurrentWrite with Simulator Tag does not save value

Former Member
0 Kudos

Hi all,

Rick mentioned the possibility to use a tag in the simulator to write values, e.g. to serialize transactions.

For a test I have created a tag as discrete, value from 0-1, write activated and set value 1. Next I created a tag query with mode CurrentWrite, selected the new tag and set value 0 and a specific daytime and execute. The result was ok.

Next I created another tag query with mode current, select the same daytime and the new tag, however the result shows value 1.

Where was I missing the point? I thought once the value 0 is set it is saved until changed or memory is resetted.

Michael

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Try doing this with a String tag.

Former Member
0 Kudos

Who tests this stuff, anyway?

Answers (2)

Answers (2)

Former Member
0 Kudos

Michael,

The CurrentWrite mode of a tag query is not working correctly (for Discrete and Analog) in MII 12.0 & 12.1. The String mode works fine. The fix will be in a service pack.

Regards,

Kevin

Former Member
0 Kudos

Jeremy, Kevin,

thanks for the hint. Changing the type to "string" solves it. Now the value is saved, and even the display in the Simulator Editor shows the correct value.

Here is a small how to for MII 12.0:

- create a new tag in the Simulator Editor, type: String, writable activated

- define a tag query to write the value, Server: Simulator, mode: CurrentWrite, leave method empty

- select the new tag in the Tag Query Details, save the query

- create a transaction, call the new tag query, link the tag name to parameter "TagName.1", link the tag value to parameter "TagValue.1"

After executing the transaction the new value is set. You can place any string you like, no matter what minimum and maximum values are defined in the Simulator Editor for this tag.

To read the value, you can use your tag query and set mode "Current".

Michael

Edited by: Michael Otto on Mar 5, 2009 8:55 AM

Former Member
0 Kudos

Did you remember to add the "Write=True" attribute to the Tag definition in the Simulator XML file?

<Tag name="MyDiscreteTag" MinRange="0" MaxRange="1" TagType="Discrete" Write="true">1</Tag>

Former Member
0 Kudos

Rick,

I do not have a XML file, but created the tag using the Simulator editor. I have mark the field "writeable" which I think is the same as the flag you mentioned in the XML.

Michael

Former Member
0 Kudos

Hmm. Sounds like they rewrote the simulator (and maybe broke it) in 12.0.