on 03-02-2009 11:39 AM
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
Try doing this with a String tag.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.