Fanuc OPC Connection

I am trying to connect to a Fanuc Robot with the HMI Package. It sets up a OPC Server. I was able to connect to the server in Ignition. Fanuc OPC uses SNPX to map its internal memory locations with it's Modbus memory addresses. When you browse the objects folder it shows Holding Registers, Coils, Input Registers, Discrete Inputs, and it also has some values that are specific to the Robot under a different folder. I can read the values that are specific to the Robot, but I cannot read/write the values that are associated with the SNPX. I tested the connection/values using UaExpert and was able to read/write values to the SNPX area, but I cannot do this through Ignition. I am not sure what I have set up incorrectly, any help/thoughts would be appreciated.

When I connect using OPC Quick Client in Ignition it allows me to browse to the Holding Registers Folder but won't expand the array of values. If I click Read it reads large array of 0 values (the values are not all 0's in the Fanuc Robot memory location that is being accessed). Is there a way to get the Quick Client to expand an array of values?

It can only browse underneath an array if the server is exposing each of the array elements as their own nodes in the address space.

If you can browse underneath this array in UaExpert but not in Ignition then it would be worth doing a Wireshark capture so we can try to spot the difference.

In UaExpert I can expand the values, but I have to read/write to them all at once. Do you have any thoughts on why the values that are being read are not correct in Ignition and I cannot write values to the array from Ignition.

No, that would be another good use of Wireshark.

When you say "read', are you reading/refreshing the attribute pane in UaExpert or creating a monitored item in the data view? Same question for Ignition.

Some screenshots of what you see in UaExpert vs Ignition to go along with the capture would also be helpful.

This I suspect is because Ignition relies on the server supporting the "index range" parameter of the OPC UA Write service, which allows targeting individual elements or a range of elements within an array, and Ignition will not merge changes to individual elements and write the whole array. Writing the whole array at once can only be done via scripting.

Ok, I will do some testing and get back to you with some screen shots afterwards.

Thank You

The issue ended up being the way that Fanuc is revealing the data, and I forgot to power down/restart the Fanuc once I configured the SNPX registers in the fanuc.

Configuration that I got working:
Ignition: OPC Tag pointing at the Holding Registers, data type Short Array
Then I used reference tags to point to specific registers in that array

Fanuc SNPX settings R[ x ]@1.1
The @1.1 causes the Fanuc to send the values as 16 bit integers instead of 32 bit.
(Note once you set the SNPX don't forget to power cycle the Fanuc)

Thanks for all the help

@Kevin.Herron I found it in the Fanuc manual and Fanuc does support the index range write.

Yesterday I had this working, but I powered down the Fanuc Controller and when I turned it back on today it was no longer working. The settings are the same in both the Fanuc Controller and the Ignition Server/Tags as they were yesterday. (side note the coil registers are still working as read/write but the holding registers are not working)

Is the proper setup for something like this an OPC Tag that looks at the Holding Registers as a short array. Then for each individual tag I am using I am creating a reference tag that points to the individual element in the holding register array?

Could it have something to do with the timeout settings or anything like that in the gateway?

What exactly isn't working?

Wireshark will always give you a good picture of what's happening (as long as you have security disabled).

I don't know if IT is going to let me set up Wireshark on the computer that it is running on.

The way that Fanuc has their OPC server set up:
Device Information --> under this they have a lot of properties that are pre-configured so you can just navigate to those and read them

Modbus --> Under this they have the nodes each representing an array Coil Array, Input Register Array, Holding Register Array, and I forget the 4th one.

I currently have an OPC tag that is pointing to the Coil Array node and an OPC tag that is pointing to the Holding Register node. I then have reference tags that point to individual elements in the arrays. All of the reference tags that are pointing to the Coil array are working as expected. I can read/write to them from both the robot and the HMI. The holding registers however are displaying as all 0's and when I try to change a value it immediately changes back to a 0. Yesterday this was working. I am also asking Fanuc if they know of something that might be blocking Ignition from reading/writing.

@Kevin.Herron I downloaded Wireshark and I will go try to see if I can get more information for you..

Thank You

If the register array is full of zeros then it's full of zeros. You'd likely see the same thing viewing the array from another client like UaExpert.

When I use UaExpert I can see the values that the Fanuc has in the Holding registers. That's what I find is strange. If I open UaExpert and navigate to the holding register node. It sees the values that are in the Fanuc holding registers and I can write to the values from UaExpert

And the OPC tag for the register array in Ignition is all zeros and has good quality?

Correct

Would be interesting to open the QC and browse to that node and do a read. Other than that you probably need Wireshark and support over your shoulder.

When I go down to the machine and set up the wireshark I will also take some screen shots

What's QC?

OPC Quick Client in the Ignition Gateway

When I read from the quick client I get all 0's