on 12-04-2009 9:02 PM
Hi,
When writing to a PLC Tag via UDS, how to determine if the write was successful. Not just based on the 'TagQuery.Success', but based on the existence of the tag. For instance, if I typed the name of a tag incorrectly ( or if the tag wasn't existing), is there a way I would know the write wasn't successful?
Regards,
Chanti.
A successful CurrentWrite query should echo the new values back to you in the query results, which should look the same as a Current mode query (a Rowset per tagname with DateTime / Value). There should also be messages in the resultset for those tags that were unsuccessful.
The Success bit will likely be true unless the whole query fails or you have a communication failure through the data server, so you will need to interpret the resultset from the query results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you generate the sample xml when the configure dialog asked you to ?
I would expect every tag in your query to be part of the response, either with confirmation or with error, so it should be normal MII format:
/Rowsets/FatalError --> only one and would also mean total failure, which should make the success bit false
/Rowsets/Rowset/Messages/Message --> could be multiple message nodes
/Rowsets/Rowset/Row/TagName --> would vary based upon with rowset and the actual xmlencoded tagname
Query results and Messages can coexist in the resultset, because a Message is non-fatal.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 | |
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.