Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DeviceNet Explicit Messaging to set values on EX260 Solenoid Manifold using NI PCI 8532 card

I am attempting to use the NI PCI 8532 card to communicate with an EX260 Solenoid Manifold that uses DeviceNet communication. 

 

I have successfully connected the card (Master) and Solenoid Manifold (as a Slave device) to the NI Industrial Communications example, "DeviceNet PXIPCI Basic." I am able to read/write basic explicit messages to the device asking for the serial number, vender ID etc. using the "ExplMsgWriteRead.vi" To do this, I used the 0xEh service ID and appropriate class and instance IDs.

 

My problem

I cannot figure out how to SET a value on the manifold. The manifold controls up to 32 valves and ideally I'd like to be able to open/close each valve individually. However, I do not understand the message syntax to acheive this. 

 

To start: I am assuming that I want to use the "Set Attribute Single" Service ID: 10h. The manual for the Solenoid valve indicates that 8 valves are associated with 1 byte, meaning that each valve is represented by 1 bit [1 ON, or 0 OFF]. I can access the valves in sets of 8 using "Byte Offset." So the first 8 valves have a byte offset of 0, then the next 8 with an offset of 1 (and so forth). The part of the manual explaining this is attached as a .png entitled "ByteOffset_Explanation..."

 

However, I have not found any information or examples so far in which DeviceNet is used with a "byte offset" parameter incorporated into the message syntax. How do I incorporate a "byte offset" into a DeviceNet message syntax in LABVIEW and can I do it with the "ExplMsgWriteRead.vi"?  Just so we're on the same page, I'm assuming the DeviceNet explicit message syntex is as follows (from the ExplMesgWriteRead VI):

 

Service ID:
Class ID:
Instance ID:
Attribute ID:
Service Data     (This is where I'm assuming I can control individual bytes?)

 

Where would a byte offset fit in here?

 

My attempts So Far:

I used the following communication parameters outlined by Part 6, on page 25 of the EX260 sdn2 manual (attached as a pdf)

 
Class ID: 09h (from manual)
Service 1D: 10h (Set_Attribute_Single)
Instance/Attribute ID: 3 (from manual)
Service Data length: 1 byte
Service Data: 0,0,0,0,0,0,0,0
 
When doing this, I get back the error: 14 FF ("The specified attribute is not supported").  What message did I actually send to the device? Should I be thinking about writing different Labview code other than using this VI? Again, I'm unsure how the message syntax works here. 
 
Anyone with DeviceNet/Labview knowledge, please help!
 
 

 

 

0 Kudos
Message 1 of 4
(5,658 Views)

Hey JmBone,

 

It's possible that you are just suppose to send a 32-bit integer to control the 32 valves. The 'byte offset' is probably just there to allow grouping of 8 valves (8 bits as 1 byte). So instead of sending an 8-bit number with some offset, you just send a 32-bit number and only change the bits corresponding to the valves you want to change. It would be easiest to just have a 32-bit binary array in your code for changine the individual valves and then cast that to a U32 integer before sending it to the Set Attributes VI. Maybe I am misunderstanding the manual, but I don't think 'byte offset' is a parameter you are suppose to specify, and is just there to indicate how the valves can be bundled into a single 32-bit value.

 

Regards,

 

Ryan

Ryan P.
CLA
0 Kudos
Message 2 of 4
(5,630 Views)

Hi guys, 

 

Just set multiple bytes in the Service data.

 

I think you want to be looking at page 22. 

 

The "offset" they are talking about isn't a part of the CIP protocol. You won't find a way to set it in LV, but at the same time it looks like you really don't need to worry about it. Just send two bytes in the service data if you have 16 valves and four bytes if you have 32. 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 3 of 4
(5,616 Views)

You also might want to try: 

 

Class ID: 04h
Service 1D: 10h (Set_Attribute_Single)
Instance/Attribute ID: 35
Service Data length: 2 byte
Service Data: 0,0
Jesse Dennis
Engineer
INTP
0 Kudos
Message 4 of 4
(5,614 Views)