User input/output groups from ProfiNet to int/byte/double

  • Hello,

    I'm trying to make a program for yaskawa YRC1000. I establish ProfiNet communication with Siemens PLC and for calling program number I made USER GROUP INPUT. Until now is good. In USER GROUP INPUT I see number in byte what I'm sending from PLC.

    Problem is that I dont know how to use this byte in SWITCH CASE function. There you can put only I (integer). But how I can move number from USER GROUP INPUT to I? I was trying DIN but there is only B or D.


    Thank you for help.

    Batezip

  • AD
  • batezip

    Changed the title of the thread from “User input/output groups from ProfiNet to byte” to “User input/output groups from ProfiNet to int/byte/double”.
  • Use DIN for it.

    The max value for 1 byte is 255 and can save in B variables, use DIN and save value of User Group Input in it and use SET instruction and take a copy from B to I variable.


    Ex:

    DIN B000 IG#(1) //save IG#(1) to B000

    SET I000 B000 //save value of B000 to I000



    Now you can use I000 in SWITCH CASE

  • I try this, but reading from IG doesn't work.

    I made exactly this:

    DIN B000 IG#(1)

    SET I000 B000


    But in IG#(1) is still 0 copying. I try this on real robot where trought ProfiNet I send some value to IG#(1) - it was visible in robot pendant but in B000 and I000 is still 0. I try same in MotoSimeEG-VRC with IG simulation and same result.

  • If you are Profinet you must check the setting for its board.

    At default the address from 30010 to 30017, 30020 to 30027, 30030 to 30037 , 30040 to 30047 and 30050 to 30057 are for digital cards on the robot, these address are working on IG#(1),IG#(2),IG#(3).

    You must check setting for Profinet board, maybe the start address is from 30060 to any byte you define.

    With this address you must check IG#(5). It is first byte of your Profinet board.

    For test, it is better to change value at PLC and check which IG# become ON in robot. When you have 0 value it means your PLC don't sent data to robot or address that you are reading is mistake.

  • I wrote it bad before, sorry.

    I have not a problem with value from PLC, I can see value in IG#(1) what I write in PLC, mapping is good.

    But then if I will use DIN B000 IG#(1) then in B000 is still 0 but in IG#(1) is for example 5.


    Program running but still 0 there.


    I hope 30xxx are outputs :-). 20xxx inputs.

  • This JOB work without any problem, if you have 0 value in B000, it means after running this JOB the IG#(1) don't have any value. You must check IG#(1) when this JOB is running.

    Also you can use a loop in this JOB and change IG#(1) value and test B000.


    NOP

    *LOOP

    DIN B000 IG#(1)

    SET I000 B000

    JUMP *LOOP

    END


    After this loop change value of IG# and check B000.


    According to latest picture that have Profinet address, the start inputs address is #20070 , you must check this address is connect to with address of Universal Input (which IG#())

  • I did exactly what you wrote. For sure to loop I put two movements that I can see that program is really working in loop while robot is moving.


    From ProfiNet is going Nr. 9 to IG#(1):


    Loop in robot:


    Variables:

  • Please go to IN/OUT menu , select GENERAL PURPOSE INPUT. Confirm the up of page show IG#001. Send a value from PLC to robot and see this page.

    Send PLC value and a picture from this page.

    It can help better.

  • Just now I found it. IG is not from USER GROUP INPUT =O , but address from right column from GENERAL PURPOSE INPUT.


    Now is working. Thank you for your help ;)

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