12-05-2005 04:19 PM
12-06-2005 02:08 PM
12-08-2005 11:32 AM
12-08-2005 01:44 PM
12-09-2005 01:52 PM
12-15-2005 04:59 PM
Regis,
Explicite Messaging knows other services then get attribute single (0EH), for example (10H) read attribute single, (02H) set attributes all and (01H) get attributes all.
The class definition states how the attributes are packed into the message.
But for the single attribute you are right, thats the way.
DirkW
12-21-2005 01:46 PM
01-04-2006 04:23 PM
01-06-2006 09:55 AM
Hi Regis,
sorry for answering a little late but i took a timeout during cristmas.
To your problem: I know it is a little tricky to get it running with the OPC Server.
Here is how it should work:
1. How to write the following parameter:
Encoder Position (ClassID=1, InstanceID=1, AttributeID=10, DataType=UDINT) !!Notice: The instance ID shouldn't be changed to 2. We want to set the same paramter to a new value.!!
(1) Configure the NIDeviceNetExp object with the right MAC ID, ServiceCode=16(SET), ClassID=1 (The object name is NIDeviceNetExpWrite1 here)
(2) Add an OPC item (Data Member) NIDeviceNetExpWrite1.IID1.USINT0 to write AttributeID.
Add an OPC item (Data Member) NIDeviceNetExpWrite1.IID1.UDINT1 to write new Encoder Position.
(3) Write the value 10 to NIDeviceNetExpWrite1.IID1.USINT0
Write the value 360 to NIDeviceNetExpWrite1.IID1.UDINT1
(4) Now and this is important you have to create the complete request message action
Read NIDeviceNetExpWrite1.IID1.USINT0 to send the request message and write the new value to your device
Attached you can find a VI showing how to program it in LabVIEW.
Hope that helps
DirkW