Famous_Fella

MrPLC Member
  • Content count

    33
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Famous_Fella

  • Rank
    Sparky

Profile Information

  • Country Greece
  1. Hi, In my HMI project I use a subroutine triggered by a button. All it does is check if certain variables are triggered and if the condition is met I use the showpage function to call a popup page.  Because of the update interval between PLC and HMI to 100msec the condition inside the subroutine is not always met although the PLC has completed the job behind the scene. Is there a way to implement a "wait until strategy" instead of the straight "IF...END_IF" I am using now ?  
  2. NX1P2 - Convert REAL to DWORD

    It appears that when sending a set_attribute command to the FANUC controller via explicit messaging you must also inform it of the data type you send. 0x6C was the answer for me. Thanks a lot Chelton.
  3. NX1P2 - Convert REAL to DWORD

    Hi, If I change the PLC data type of the array to DWORD, reading a register from the FANUC controller with the value -150 is translated as "C316 0000" in my PLC DWORD variable. Setting my variables to any kind of INTEGER does't extract anything from the robot.
  4. NX1P2 - Convert REAL to DWORD

    It is Ethernet IP
  5. NX1P2 - Convert REAL to DWORD

    If I try to send the number 2 as real data type the robot register reports the value 1.07584e+09. Reading and saving REAL numbers from robot to PLC REAL data types works just fine. Sending a real number though produces this.  
  6. NX1P2 - Convert REAL to DWORD

    Hi, Thanks for the replies. I am extracting real values from FANUC Robot Registers using the explicit messaging. Then, through the HMI I manipulate those values and use explicit messaging again to send them back to the robot controller using CIPUCMMSend function but unfortonately the ServiceDat containing the value to be transfered to the robot may only be a DWORD.
  7. Hi, I am trying to convert a variable of REAL data type to DWORD. I 've tried using Real_To_Dword function which works fine if the real number is integer but when the real is decimal the function rounds the decimal number to INT first (I ve also read it in the instruction manual so no surprise here). I 've also tried experimenting with the function CopyRealToDWORD but again the outcome was not what I expected. Is there another way to convert decimal real numbers to DWORD without losing the decimal portion?
  8. Copy array element to member of a structure

    Thanks a lot for your help. I thought it was prohibited to use MOVE for Array data type so I didnt even try it. It works as intended.
  9. Hello, In my ladder program I have 7 different arrays (containing REAL values) all members of a structure and I wish to extract certain values from the arrays and put them on another structure consisting of REAL values (not arrays). Which is the best way to do that ? I tried AryMove command but I get an error "Conversion from REAL to ANY_ELEMENTARY[], ENUM[], STRUCT[] is impossible. To get a better understanding of my structures and arrays here is an example: Struct wheel_data Global variable SWheel of wheel_data rad[1...10] of real, vary[1...10] of real, varx[1...10] of real struct. 2 wheel Global variable Wheel1, .... , wheel10 of wheel rad REAL, vary REAL, varx REAL what I wish to do is to copy Swheel.rad[1]  to wheel1.rad,  Swheel.vary[1] to wheel1.vary, Swheel.varx[1] to wheel1.varx 2nd structure Swheel.rad[2]  to wheel2.rad,  Swheel.vary[2] to wheel2.vary, Swheel.varx[2] to wheel2.varx until I fill all 10 wheel structure instances with values Thanks in advance.
  10. EtherNetIP Programming with Sysmac

    Extract the EDS file directly from the robot. If it is a FANUC Robot you press MENUS > FILE > Set Device (to choose a USB drive to save) and after press backup (on R30iB controller) and choose "Com. Conf." option. This will extract the EDS file to the USB
  11. NX1P2- explicit messaging to FANUC Robot

    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.
  12. NX1P2- explicit messaging to FANUC Robot

    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    
  13. NX1P2- explicit messaging to FANUC Robot

    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.
  14. NX1P2- explicit messaging to FANUC Robot

    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
  15. NX1P2- explicit messaging to FANUC Robot

    this code setup doesnt fill the array