RobotStudio event

Read profibus inputs as INT?

Hi,

Is it possible to specify any group inputs or the like as INT so it's possible to get a negative integer value over profibus without the file and serial hadling option where you can convert as raw data.

For example: Have a group of 16 bits input. I want these to take a number between (rounded off for ease of typing) -32000 to 32000.

Best regards,

Alexander K

AlexK2008-8-8 14:17:0
Best regards
Alexander Källberg

Comments

  • Hi Alexander,

    change your groupinput into a analoginput, like this example

    current configuration:
    -Name "giValueFromPLC" -SignalType "GI" -Unit "PB_Card" -UnitMap
    "0-15"

    change to:

    -Name "aiValueFromPLC" -SignalType "AI" -Unit
    "PB_Card" -UnitMap "0-15"
    -MaxPhys 32767 -MaxBitVal 32767 -MinPhys -32767
    -MinBitVal -32767

    When you can read negativ values directly into a NUM-variable.


    Best regards
    thilbi


  • Thank you very much! That is exactly what I wanted!

    Best regards

    Alexander

    Best regards
    Alexander Källberg