1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Nachi Robots
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Read 16 input bits to V1% without using internal PLC

  • selquist
  • November 28, 2024 at 3:43 PM
  • Thread is Resolved
  • selquist
    Reactions Received
    2
    Trophies
    3
    Posts
    15
    • November 28, 2024 at 3:43 PM
    • #1

    Hi guys. I have 4 EZ03V4's, and are new to Nachi but old to other brands...

    I wish to avoid using the internal PLC to handle variables (16 bits) and run values from/to the EthernetIP directly in the usertask. Single bits are no problem. Only Byte/Word gives me a headache.

    I can use the "Combination Output" O5101 as a 16 bit output together with MULTIM O5101,V1% to write to 16 bits. But the "combination input" combines to logical 1 signal, so i guess, I can’t read the binary value from 16 inputs using this function. Can I even use MULTIM in the usertask?

    So how to write a variable to 16 bits in the usertask?
    And how to read the value of 16 bits in the usertask? If at all possible... Or am I doomed to use the Internal PLC and subsequent interlock.

    Any guide is much appreciated :thumbs_up: Many thanks in advance

  • Go to Best Answer
  • bsrr
    Reactions Received
    10
    Trophies
    3
    Posts
    146
    • November 30, 2024 at 12:16 AM
    • #2

    GETSIGB ( i1, i2) can get the input or output signal value specified in "i1" in bytes. Details of the GETSIGB Function are available in the Robot Language Manual.

  • bsrr
    Reactions Received
    10
    Trophies
    3
    Posts
    146
    • December 3, 2024 at 2:37 AM
    • #3

    For example, read inputs from 1 to 16.
    V1%=GETSIGB(4,0)+2^8*GETSIGB(5,0)

  • selquist
    Reactions Received
    2
    Trophies
    3
    Posts
    15
    • December 4, 2024 at 9:42 AM
    • #4

    Thanks for that input bsrr. Because of that, I actually found an example in the UserTask-manual on how to read data from bits using the same command. The example uses both 2 decimals and sign bit.:

    ‘OFFSET
    ‘X (in the range of I2001 to I2016)
    L1% = GETSIGB( 251 , 0 )
    L2% = GETSIGB( 252 , 0 ) AND &H7F
    L3% = L1% + L2% * 256
    L1! = L3%-2*L3%*INP(2016)
    V1! = L1! / 10

    Now lies the task of testing, which solution is the easiest and fastest to work with :smiling_face: In my case, speed is number one priority, but ease of maintainability is on a strong second place.

    I plan to clock/time both ways. Using Software PLC (Continuously calling BTOD16 and DTOB16) and without PLC (using UserTask with MULTIM/Combination Outputs and GETSIGB-commands).

    Will post result of tests before Christmas :thumbs_up: Interesting what the fastest way to move data to/from the robot will be. Hope to avoid using the Software PLC (and by it, another layer of scan-time), but if the other solution works out to be cumbersome, it can end that way.

  • selquist
    Reactions Received
    2
    Trophies
    3
    Posts
    15
    • December 12, 2024 at 11:21 AM
    • #5

    Examples with following settings:
    PLC Scan time = 0.5ms
    EthernetIP poll/RPI = 5ms
    Robot PLC = 5ms
    Delay in Usertask = 10ms
    No motion running!
    Results is each after approx. 20 manually started cycles, logging the maximum response time...

    Moving a value in 16 bits (using BTOD16 and DTOB16) from PLC -> Robot PLC -> Usertask -> Robot PLC -> PLC:
    -Usertask Priority 4: 210ms
    -Usertask Priority 5: 60ms
    -Usertask Priority 6: 70ms

    Moving values without the Robot PLC in bits from PLC -> Usertask -> PLC:
    -Usertask Priority 3: 130ms
    -Usertask Priority 4: 60ms
    -Usertask Priority 5: 37ms
    -Usertask Priority 6: 35ms

    Leasons learned so far:
    -Handling data through the Robots internal PLC adds a lot of delay.
    -Usertask priority, going from default 4 to 5 have enormous influence.

  • selquist
    Reactions Received
    2
    Trophies
    3
    Posts
    15
    • December 12, 2024 at 3:05 PM
    • Best Answer
    • #6

    Solution. Using 32 bits per way instead of 16. No need for Robot PLC.
    Manual for FD does not include this command. Manual for CFDs (my controller) includes this.
    This solution includes sign bit. Start number 65 is an example of a bit area. 32 is the number of bits.

    'PLC value (DINT) to Robot Integer
    V%[1] = ISIG2INT(65, 32)

    'Robot Integer to PLC (DINT)
    INT2OSIG O65, 32, V%[1]

    :smiling_face_with_sunglasses:

  • bsrr
    Reactions Received
    10
    Trophies
    3
    Posts
    146
    • December 13, 2024 at 12:32 AM
    • #7
    Quote from selquist

    -Usertask priority, going from default 4 to 5 have enormous influence.

    Useful Information:thumbs_up:

  • selquist January 24, 2025 at 7:19 AM

    Selected a post as the best answer.

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download