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. KUKA Robot Forum
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

4-20mA Analog Output

  • AgainstGravity
  • July 20, 2019 at 9:42 PM
  • Thread is Resolved
  • AgainstGravity
    Trophies
    3
    Posts
    18
    • July 20, 2019 at 9:42 PM
    • #1

    Hi all!

    I just added a Beckhoff EL4024 module for analog outputs (4-20mA) to the EK1100 coupler inside KRC4.
    In that sense, seems that it's working fine: ANOUT= 0.0 gives 4mA; ANOUT = 1.0 gives 20mA.

    The thing is, from what I have read, KSS lets you any value from -1.0 to +1.0 to any ANOUT.
    In my mind, that makes sense if you have a 0-10DC module, as it goes from -10 to +10V.
    But do negative values make sense for mA? What could/should happen if I set -1.0?
    It might be a very basic question, but I didn't want to try before asking.

    Thanks!

    PS: KRC4 // KSS 8.3 // WV 4.0
    PS2: I haven't been able to find any similar post regarding this question. Apologies if it's repeated.

  • SkyeFire
    Reactions Received
    1,062
    Trophies
    12
    Posts
    9,465
    • July 21, 2019 at 12:18 AM
    • #2

    It depends on the device you've connected. I've never seen a mA analog module that is bipolar, but they may exist. There are definitely Voltage output modules that can go + or -.

    The trick is that, for any analog FieldBus module (either input or output), the analog value is converted into a digital equivalent for transmission over the bus. Just how this occurs depends on the specific module.

    For example, a 12bit 0-10V module (unipolar) might ignore the sign bit entirely, or incorporate it into the entire I/O word. An unsigned 12bit value maxes out at 4095, so the resolution of the module would be 2.5mV.

    OTOH, a 12bit -10 to +10 module from the same manufacturer would use the 12th bit as the sign bit, meaning the integer word would swing from -2047 to +2047 (with some caveats for different encoding schemes), so the resolution would be 4.8mV.

    The math works the same for any analog module attached to a KRC's ANOUT or ANIN. The encoding differences for the different bit ranges and voltage/current ranges is handled at the bus/module configuration level. When set up properly, the full scale of the analog module (5V, 10V, 20mA, whatever) should map to a simple 0-1.0 or -1.0 to +1.0 ANOUT/ANIN value.

    Basically, you can treat the ANOUT/ANIN values as a % of the maximum signal of the analog module. A 10V module should put out 5V for an ANOUT of 0.5, and a 5V input module should report an ANIN of 0.5 when detecting 2.5V.

    Sending a negative value to a module that accepts only positive values could have unpredictable results. Not "blow up" unpredictable, just mathematically unpredictable. It depends both on the module, and on exactly how you configure the module's conversion factor in IOSYS.INI or in the I/O mapping of WorkVisual.

  • AgainstGravity
    Trophies
    3
    Posts
    18
    • July 21, 2019 at 3:40 PM
    • #3

    Thank you so much!

    Quote

    The math works the same for any analog module attached to a KRC's ANOUT or ANIN. The encoding differences for the different bit ranges and voltage/current ranges is handled at the bus/module configuration level. When set up properly, the full scale of the analog module (5V, 10V, 20mA, whatever) should map to a simple 0-1.0 or -1.0 to +1.0 ANOUT/ANIN value.

    Quote

    It depends both on the module, and on exactly how you configure the module's conversion factor in IOSYS.INI or in the I/O mapping of WorkVisual.

    Where could I check /set that? What I've done is get the .xml from Beckhoff -> DTM, add it to the project, map signals from Fielbuses and deploy/activate project.
    I can see the attached image when I open the module settings.


    Quote

    Sending a negative value to a module that accepts only positive values could have unpredictable results. Not "blow up" unpredictable, just mathematically unpredictable.

    Does it mean I'm safe to try out a negative value and check w/ the multimeter?

    Again, thanks for the help.

    Images

    • EL4024.JPG
      • 121.45 kB
      • 904 × 818
      • 68

    Files

    EL4024.JPG_thumb 15.65 kB – 248 Downloads
  • SkyeFire
    Reactions Received
    1,062
    Trophies
    12
    Posts
    9,465
    • July 21, 2019 at 7:16 PM
    • #4

    Well, when you grouped the signals in WV, did you set them as I/O, INT, UINT, DINT, etc?

    For some bipolar devices, the MSB is the "sign" bit and the other bits are "magnitude", so (for a bipolar 16bit device) a binary value of 1000000000000001 is the same as 000000000000001, just opposite polarities. Assuming a +/-10V device, this would be -0.009mV and +0.009mV, respectively.

    However, some devices encode differently -- 1000000000000001 would -10V, and as the binary value "below" the sign bit gets bigger, the analog value decreases, so 1111111111111111 would be -0.009mV.

    That's what I meant about "unpredictable" behavior -- if you send a negative value to your unipolar device, just what would come out would depend on which encoding it was expecting you to use.

    For testing, I usually just make a program that increments the ANOUT by one bit at a time (I usually map my analog devices as digitals, so I can directly control the "raw" binary), and record the output on a multimeter at each step. Then I plot both values against each other in a scatter plot in Excel, or something similar.

    For analog inputs, pretty much the same, except I wire a potentiometer into the input and slowly dial it up/down, while recording the ANIN and the multimeter reading, for a similar plot.

    That will usually show me pretty quickly how the combination of the device and WV configuration behaves.

  • AgainstGravity
    Trophies
    3
    Posts
    18
    • July 22, 2019 at 12:08 AM
    • #5

    Cool, thanks!

    Quote

    Well, when you grouped the signals in WV, did you set them as I/O, INT, UINT, DINT, etc?


    I totally missed that row in I/O mapping! :icon_eek:
    Changing it to UINT would make it.


    Quote


    For testing, I usually just make a program that increments the ANOUT by one bit at a time (I usually map my analog devices as digitals, so I can directly control the "raw" binary), and record the output on a multimeter at each step. Then I plot both values against each other in a scatter plot in Excel, or something similar.

    That's interesting! And makes a lot of sense.
    The thing is WV lets me assign WORD, as well as SINT/USINT and INT/USINT, but I don't know against which output should I map it.
    Analog Outputs let me choose only SINT/USINT & INT/UINT.

  • SkyeFire
    Reactions Received
    1,062
    Trophies
    12
    Posts
    9,465
    • July 22, 2019 at 5:19 PM
    • #6

    Yeah... the WV docs don't go into any detail concerning exactly how SINT/USINT/DINT/etc are defined at the binary level. And I usually didn't want to be bothered with it, so I usually went for "raw" I/O and did the encoding/decoding in KRL, did everything in "digital," and avoided the ANIN/ANOUTs almost entirely. Probably not the most elegant way to proceed, but I'm an Old Fart. :tired:

  • AgainstGravity
    Trophies
    3
    Posts
    18
    • July 25, 2019 at 12:25 AM
    • #7

    Got it! Thanks again for everything :icon_smile:

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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • 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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • 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