NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Welcome to EtherNet/IP Industrial Protocol Support

I tried using labview again with helpful hints from this group - I downloaded the Logix5000 data access manual from the AB website.

Error code 0x04 in the manual, and returned from the code indicates a "syntax error".

I think this means I am still not getting the tag name correct.


Here's what I tried - "Command_REAL" is a float array, and _1912_Haystack.ACD is the name of the AB program.
I tried "Command_REAL",

"Command_REAL[0],

"Program:_1912_Haystack.Command_REAL",

"Program:_1912_Haystack.Command_REAL[0]",
"Program:_1912_Haystack.ACD.Command_REAL",

"Program:_1912_Haystack.ACD.Command_REAL[0]"

And all returned error 0x04

Also, I just learned this, the program name is Hay"S"tack, not Hay"s"tack, note the capital S in HayStack.

How sensitive is the controller to capitalization of variable names?

thanks,

bob s.

0 Kudos
Message 31 of 125
(5,486 Views)

scarlson wrote:

Hello Eric --

Just want to say, the ethernet/ip library looks like its coming along well. I just started digging into a project today.

I am creating a Labview Remote IO Device and communicating with an Allen-Bradley ControlLogix 5563. From my reading it appears that setting up a Class 1 Adapter device seems appropriate. I am attaching several screen shots and have some questions.

#1 -- In RsLogix v16.03 there appears to be a glaring difference from the help documentation supplied with your library. When creating the Generic Ethernet Module I noticed that my Input/Ouput parameters are in units of 32bit (not 8bit as shown in "Configuring your plc" in the libraries docs"). Was this a recent Allen-Bradley change? Are you aware of it? Will this affect me...

#2 -- Ignoring the size units, I attempted to create a connection from PLC to Labview and in the attached screen shots you will notice the Module status window in RSLogix with an error message. Some further digging with wireshark (also attached) shows that there are errors in the CIP packets coming from my device to the plc.

- I'd like to note that this wireshark data was recorded while my laptop was connected directly to the plc with a cross-over cable (to avoid any possible network switch interference).

Any suggestions/feedback would be greatly appreciated, If you need any further info, I will provide quickly!

I couldn't see how to attach a file here. Here is the link to my attached info http://decibel.ni.com/content/servlet/JiveServlet/downloadBody/13836-102-1-23758 /LvEthernetIP_Class...

Thanks,

Scott

Hi Scott,


Sorry for the delay... the forum software appears to be having issues sending notifications on new posts... The issue appears to be that you have the "Comm format" setting set to 32-bit REAL (floating point), thus the size is going to be in 32-bit elements. You could changeit to 8-bit elements and then it would match the byte count of your assembly. You might need to delete and re-add the module to change the format. The main important point is that the overall size between the two matches and that you both interpret data in the same way (either directly or by casting it on either end).

Eric

0 Kudos
Message 32 of 125
(5,486 Views)

robertschaefer wrote:

I tried using labview again with helpful hints from this group - I downloaded the Logix5000 data access manual from the AB website.

Error code 0x04 in the manual, and returned from the code indicates a "syntax error".

I think this means I am still not getting the tag name correct.


Here's what I tried - "Command_REAL" is a float array, and _1912_Haystack.ACD is the name of the AB program.
I tried "Command_REAL",

"Command_REAL[0],

"Program:_1912_Haystack.Command_REAL",

"Program:_1912_Haystack.Command_REAL[0]",
"Program:_1912_Haystack.ACD.Command_REAL",

"Program:_1912_Haystack.ACD.Command_REAL[0]"

And all returned error 0x04

Also, I just learned this, the program name is Hay"S"tack, not Hay"s"tack, note the capital S in HayStack.

How sensitive is the controller to capitalization of variable names?

thanks,

bob s.

Hi Bob,

Sorry, that syntax is undocumented by Rockwell. I suspect it may be related to having a period (".") inside of your program name that is preventing it from working. Those tag names go mostly unmodified from our software to the PLC and it is up to them to interpret it. You might have better luck opening a support issue with Rockwell and asking them for advice on how to formulate the tag name.

The only other suggestion to narrow it down would be to create tags of varying complexity on the PLC (one global float array, then one that is under a new program without a period in the name) and see if you have any trouble accessing those. This will at least help you narrow down what is causing it to be inaccessible.

Eric

0 Kudos
Message 33 of 125
(5,486 Views)

I am using LabVIEW 2010 on a Windows XP PC.  This PC is connected to two different networks using two different network cards.  The first network is the local machine network.  It uses a static IP address and is used to connect to an Allen Bradley ControlLogix PLC using the LabVIEW Ethernet IP industrial communication.  The second connection is to the plant network and uses a dynamic address.  These connection is used for database integration.  The problem I am having is when both networks are connected and I start the VI, the LabVIEW Ethernet IP driver will not connect to the PLC.  If I disconnect the plant network, it will then connect to the PLC.  I then can reconnect the plant network and both will work fine.  I need to be able to start this VI and have both network connections connect without unplugging the plant network.  I have verified that the network adapter that uses the Ethernet IP communication is set to the higher priority.  Has anyone had this problem or having any suggestions? Thanks! Brad

0 Kudos
Message 34 of 125
(5,486 Views)

Thank you for this addon.  It is most helpful.. I have been able to pass i/o from labview to an AB CompactLogix using the I/O read and write vi.  But when I try to use an assembly, I  am having difficulting connecting my controller with labview.   I get an 16#0005 Connection Error: Bad class when the controller is trying to connect to pc. I tried the Demo EPI Adapter. I still have the error on the PLC and do not transfer data.  Do you have any suggestions?

Joan

0 Kudos
Message 35 of 125
(5,486 Views)

Hi All,

Could someone please have a look at the attached image of some AB and Labview code and tell me if I'm on the right track?

Edited:

Or would I use the tag Local:3:I.Data.5

Thanks,

Paul

0 Kudos
Message 36 of 125
(5,484 Views)

rocket84 wrote:

I am using LabVIEW 2010 on a Windows XP PC.  This PC is connected to two different networks using two different network cards.  The first network is the local machine network.  It uses a static IP address and is used to connect to an Allen Bradley ControlLogix PLC using the LabVIEW Ethernet IP industrial communication.  The second connection is to the plant network and uses a dynamic address.  These connection is used for database integration.  The problem I am having is when both networks are connected and I start the VI, the LabVIEW Ethernet IP driver will not connect to the PLC.  If I disconnect the plant network, it will then connect to the PLC.  I then can reconnect the plant network and both will work fine.  I need to be able to start this VI and have both network connections connect without unplugging the plant network.  I have verified that the network adapter that uses the Ethernet IP communication is set to the higher priority.  Has anyone had this problem or having any suggestions? Thanks! Brad

Hi Brad,

Sorry, the ni.com/labs forums are not sending email notifications of new posts properly. This has been reported and should hopefully be fixed soon...

As for your problem, it sounds like a networking issue. Our stack uses the networking stack in the same way as any other application. When both networks are connected, you should be able to ping both the PLC on the local network and the database or other system on the plant network (such as using "ping" from the Windows console). If this doesn't work, neither will Ethernet/IP.

I would tend to suspect you might have your addressing misconfigured or else there could be a clash between the address spaces of the two network interfaces. What IP addresses and subnet masks are assigned to your two interfaces on the PC? Those will determine the routing that Windows will use to decide how to talk to a remote address.

A second possibility is a firewall. Oftentimes firewalls will set different policies depending on the network they are connected to (if it detects your plant network it could restrict access to other network simultaneously).

Eric

0 Kudos
Message 37 of 125
(5,484 Views)

joano wrote:

Thank you for this addon.  It is most helpful.. I have been able to pass i/o from labview to an AB CompactLogix using the I/O read and write vi.  But when I try to use an assembly, I  am having difficulting connecting my controller with labview.   I get an 16#0005 Connection Error: Bad class when the controller is trying to connect to pc. I tried the Demo EPI Adapter. I still have the error on the PLC and do not transfer data.  Do you have any suggestions?

Joan

Joan,

Do you have the PLC configured with an IO module configured exactly like the screenshot shown with the Demo Adapter VI? Can you include screenshots of your setup on both ends?

Eric

0 Kudos
Message 38 of 125
(5,484 Views)

pjackson59 wrote:

Hi All,

Could someone please have a look at the attached image of some AB and Labview code and tell me if I'm on the right track?

Edited:

Or would I use the tag Local:3:I.Data.5

Thanks,

Paul

Paul, if those are program-scoped tags you might need to add "Program:" to the tag name in LabVIEW.

Eric

0 Kudos
Message 39 of 125
(5,484 Views)

Hi Eric,

Is there any means by which the EtherNet/IP driver can be used with 2010 on x64 Windows 7?  Thanks  

0 Kudos
Message 40 of 125
(5,484 Views)