Famous_Fella

NX1P2- explicit messaging to FANUC Robot

31 posts in this topic

I could obviously try and move the values of ResDat array to the SWheel.Z_variance array AFTER the message but I am curious to know why it doesnt work like this.

Again this a CIPUCMMSend function but with service Get_Attribute_Block

Edited by Famous_Fella

Share this post


Link to post
Share on other sites

UPDATE

I found the reason why this happened. Reason is, I currently use 2 CIP messages, 1 to read 1 to write on separate POUs, but I used the same global variable passed on the RespServiceDat parameter of both instances. Changing the variable passed to internal on the first message corrected my problem.

Share this post


Link to post
Share on other sites

Good to hear.  Thanks for the update.  I was going to take a look at this today,  at first glance though it seemed like it should have worked.  I would not have been able to duplicate your issue (without the code anyway).

Share this post


Link to post
Share on other sites

Concerning the project so far:

I managed to use Set_Attribute_single service to manipulate 1 Numeric Register on the Robot and Get_Attribute_block service to read 6 Blocks of numeric registers each block containing 6 numeric registers. Now here comes my question:

I use one POU with 6 rungs, each rung consisting of the CIPUCMMSend command for each block to be read. I use Get100msclk command on each rung to force each message every 100ms and update the values of each block. Is this an efficient way? Is it wise to send 6 messages indefinetely every 100 ms ? Would you advice on using a switch to turn the UCMMSend on and off ?

Also, concerning configuration of Ethernet IP the RPI set from the originator was left on default of 50ms. The RPI on the Target (robot) was left on 35ms (default) all this from the integrator that installed the machine. Problem is I use LAN network to connect to the machine but the machine runs behind a VPN so I am unable to reconfigure the basic Ethernet IP using CX Network Configurator (because the PLC runs on an address of 192.168.150.1 but I use 192.168.0.164 provided by the NAT of the VPN router to connect). Is there any solution to reconfigure the entire Ethernet IP of the machine?

 

EDIT:  connecting locally using a Laptop is not  an option for the time being

 

 

Edited by Famous_Fella

Share this post


Link to post
Share on other sites
On 26/3/2020 at 3:39 PM, Michael Walsh said:

Good to hear.  Thanks for the update.  I was going to take a look at this today,  at first glance though it seemed like it should have worked.  I would not have been able to duplicate your issue (without the code anyway).

Concerning that matter, the issue was that for sending messages both the set and get messages were sharing the same UCMMSend instance name, and accounting the fact that the RPI values are set really high on my system, the PLC was sending a write message and before it would get a response it was trying to send another message (my Main Task's scan time is 2ms) with the same instance name producing conflicts. So to anyone who will try to use explicit messaging extensively to communicate with a FANUC robot, people check your RPI values set from both PLC AND Robot. Every single minute I invest more on this project I realize that for the combined setup of a robot and a PLC to work together eficiently you really need to be half an OMRON half a FANUC expert with a Master's degree in Computer Networks.

Edited by Famous_Fella

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now