Sending Int16 or Uint16 as command value

Forum Home Forums Understanding the Software Sending Int16 or Uint16 as command value

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #494
    Avatardejan
    Participant

    Hi Mikhail,

    I am trying to send 2-byte integer as command value to the Modbus device. In “Output channels” table for the specified output channel I have declared “Standard” as “Command Type”. As far as I understand in this case the value is being sent as a 4-byte floating point number. Can’t figure out how to send the value as a 2-byte integer. Moreover, by checking the Communicator log i see that the actual value sent is always 00 00 regardless of the value entered in the Value box.

    Please help,
    Dejan

    #495
    MikhailMikhail
    Moderator

    Hi Dejan,
    Your configuration seems correct. In the new version of SCADA-Communicator commands are displayed on the Device Data page. What is the command value there?

    #505
    Avatardejan
    Participant

    I’m still using the previous version 4.4 of Communicator and I can’t see command values there. Regardless of that, in “Standard” command type description provided in Administrator app, it says that for “Standard” type, command parameter is floating point number. And it seems that value entered is treated as such. So, I have no idea how to send an integer as command value.

    If it is necessary, I will install the latest version of Rapid Scada.

    Dejan

    #506
    MikhailMikhail
    Moderator

    Hi,

    Double value is trancated by Modbus driver. Value type is not a problem.
    You could update SCADA-Communicator only. It’s easy. Make backup copy. After updating, copy the config folder and check the settings.

    #507
    Avatardejan
    Participant

    Hi,

    I’ve installed the new Communicator. Now, when I send any value I get this log in Device Data / Commands:

    | 2 | 18/09/2015 10:14:55 | Command: type = Standard, device num. = 1, value = N3 |

    What does N3 mean?

    #508
    MikhailMikhail
    Moderator

    It is a displaying bug )
    It was fixed yesterday, but not published. Sorry. I shall do it till the midnight.

    #509
    Avatardejan
    Participant

    Hi Mikhail,

    Thanks for your replies, but I still don’t have the answer to my original question – what to configure and how in order to send a value as 2-byte integer to a Modbus device.

    #510
    MikhailMikhail
    Moderator

    First of all, you should find where the value got lost.
    Please remind me, if you send command by SCADA-Communicator directly, it works OK?

    #511
    Avatardejan
    Participant

    No, it doesn’t. I can only correctly send binary data from communicator.

    #512
    Avatardejan
    Participant

    For example, if I send a simple number like 100 or 200, my modbus device receives 0. If I send binary hex data 00 64 (=100 decimal) my device receives 100.
    All that done directly from communicator.

    #513
    MikhailMikhail
    Moderator

    How the command is configured in the device template? Send a screenshot, please.

    #515
    Avatardejan
    Participant

    #516
    Avatardejan
    Participant

    https://drive.google.com/file/d/0B6UnLsN1oaMgM05RcWhYdVFKelk/view?usp=sharing

    In my machine I’m using Modbus function 16 for writing to holding registers. That’s why “Multiple is checked” to tell communicator to use function 16 instead of function 06.

    • This reply was modified 5 years, 1 month ago by Avatardejan.
    #518
    MikhailMikhail
    Moderator

    You need to create your own function in Formulas table which converts double input value to the array of bytes. Then use your formula in Output channels table.
    Also you need to upgrade SCADA-Server to 4.5.

    #519
    Avatardejan
    Participant

    OK, got it.

    Thanks

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