on 09-04-2007 6:44 PM
Hi,
Does anyone know how to write to an OPC server using Business Logic? I would like to write a "part number" from a Historian Calc to a OPC tag.
OPC is Kepware OPC/DDE KepserverEx
I can pull "part number" from Historian in a BL transaction and I can pull OPC "partnumber" tag in seperate BL transaction. Ho do I get info from first transaction to the next.
I have info on how to accomplish in SQL but unfortunately it is tag.
Thanks
Mike
Also, I can change the OPC tag value from the currentwrite query template by setting the tag value then testing it.
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then save that as a query template and configure it in your second sequence (they should be one sequence on top of the other). Then in the Incoming links for the action in the 2nd (bottom) sequence link the value into TagValue.1 (it should be a "T" icon property on the root (not the results xml structure).
From your last post it sounded like maybe you were trying to 'push' the results from one into the other, but the way it works is the 2nd one will 'pull' the results from the Current query.
Jeremy,
I attended theTZMII intro class a few months ago. The problem for me is that we did not have Xmii installed yet. My background is in manufacturing not IT which made the class quite overwhelming. I have never had an IT class before. Right now I know enough to play around, and that is about it.
Do you know of any BL tutorials or of anything which can help my development. I will attend the next training class when it is available. Besides the SAP network, I cannot find any help.
Thanks
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahhhhhhhhhhh, there it is. I was forcing the issue. Thanks for all the help Jeremy.
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mike,
Glad to hear it's working now! Any chance you are signed up for training, but are attempting to learn xMII on the job before the class is scheduled?
Incoming Links happen before the action does its job and Outgoing Links happen after the action has done its job. So in this case running the CurrentWrite query template was the 2nd action's job, and the incoming link told it what value to use in the write process.
The attempt to push a link down doesn't work because the scope of a given action is only relevant to objects above. The current query action couldn't push the link to the write query action since it didn't really exist yet.
Regards,
Jeremy
Jeremy,
I have created the 2 sequences and linked them how you said. When I evaluate, the part number appears to be fine. But yet I have no results in the OPC.
Just to verify
Incoming Current Query (TagQuery action) is
IllumTagQuery_MaterialDesc.Results{/Rowsets/Rowset/Row/Material_Desc_Calc}
links to TargetXPath
CurrentWrite Query (TagQuery action) is
IllumTagQuery_WRITETO.Results{/Rowsets/Messages/Message}
I do not see TagValue.1 property in right side
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have enabled write on the OPCUDS data server and tested the query. For results I get "No tag value specified for tagname"
In BL, I open up a tagQuery called CALC with the incoming value for tag "MaterialDescCalc" outgoing to tagQuery WRITETO tag "PartNumber"
It evaluates in the link editor OK but I get a blank for the tag value in the OPC
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mike,
You will first need to do a Current Query (TagQuery action) against your MaterialDescCalc tagname to get the source value.
Then in the next sequence put a CurrentWrite Query (TagQuery action) that references your PartNumber tagname, and in the Incoming Links assign Rowsets/Rowset/Row/MaterialDescCalc from the first action to the TagValue.1 property.
This way it will query the value and the CurrentWrite template will use the results to send the update to the OPC server.
Regards,
Jeremy
Jeremy,
I get an error "The UDS is not enabled for write modes" when I test the query. Rhis may be why I am having trouble.
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you investigated CurrentWrite mode for the TagQuery?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
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.