Modbus Data Formula

Forum Home Forums Communicating with Devices Modbus Modbus Data Formula

Tagged: , ,

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #13827
    TroyV23
    Participant

    Hi,
    I am trying to read an alarm Register on a Modbus TCP device.
    I have it communicating correctly right now reading a float value.

    I want to read a Register at:
    HEX 0x812
    uint16 data type
    HiByte, Bit 0-2

    I know this must be a formula, I’m just not sure how to do it.

    #13828
    Mikhail
    Moderator

    Hi,
    Please make a screenshot of the received data and provide an example what data you need to extract.

    #13874
    TroyV23
    Participant

    • This reply was modified 1 year, 9 months ago by TroyV23.
    #13876
    TroyV23
    Participant

    How Do I capture received data?

    #13878
    Mikhail
    Moderator

    Check Communicator – Communication Lines – Your line – Line Stats – Line Log

    #13888
    TroyV23
    Participant

    I just realized that my received data is missing the last 2 words?

    Sent:

    01 02 00 00 00 06 CE 04 08 0E 00 02

    Response:

    01 02 00 00 00 07 CE 04 04 00 00 FF FF

    I expected response to be:

    01 02 00 00 00 07 CE 04 04 00 00 FF FF 00 00

    Do you have any clues as to why that is?

    #13890
    Mikhail
    Moderator

    Could you make a screenshot of the log?

    #13900
    TroyV23
    Participant

    Screenshot

    #13901
    Mikhail
    Moderator

    Communication works well.
    What tag data is displayed on the device data page? Could you clarify the question?

    #14223
    TroyV23
    Participant

    I was able to get it working, my device actually had a modbus register that defined everything for me.

    I still have a question though:

    I have an alarm channel that either shows “0” when alarm is OFF or “256” when alarm in ON. When the event shows it gives a generic description that is not useful for users. Is there a way for me to define what the event says?

    I also want a formula to show “1” instead of “256” when alarm in ON.

    #14226
    Mikhail
    Moderator

    > Is there a way for me to define what the event says?
    The answer depends if you use Rapid SCADA 5 or 6. For version 6, set channel properties:
    Input formula would be Cnl > 0 ? 0 : 1
    Format is Off-On

    #14281
    TroyV23
    Participant

    Input formula would be Cnl > 0 ? 0 : 1
    Format is Off-On

    Thanks!
    That worked perfectly, I just had to make a custom format to reverse the “Off-On” to “On-Off”.

    #14347
    TroyV23
    Participant

    I now have the On-Off condition working but I realized it broke my LED scheme component condition. How do I make the LED indicator condition show green when no alarm, and red when alarm is on.
    The condition options have to be numbers, and that doesn’t work anymore.

    Thanks in advance!

    #14354
    Mikhail
    Moderator

    How do I make the LED indicator condition show green when no alarm, and red when alarm is on

    Open the Conditions property of the component and change the colors.

    #14391
    TroyV23
    Participant

    I reversed the conditions, it works now 🙂

Viewing 15 posts - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.