Connecting Devices Using Modbus Protocol

Forum Home Forums Communicating with Devices Modbus Connecting Devices Using Modbus Protocol

Tagged: ,

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #6442
    joeh6966
    Participant

    I viewed your video on YouTube, https://www.youtube.com/watch?v=Y4t9_qICKjc&list=PLeyJvzEKXs5DioKHdYWdy3kr6EMIJax0W&index=7 , on configuring Modbus 2 times and am still lost due to my difficulty understanding your accent and how fast you go.
    So, I reviewed and tried to learn how using the documentation. I cannot even get the test project with KpModbus_Adam6015.xml to run. I get “error” instead of normal and communication error.
    I previously just went for my end game by trying to configure Rapid SCADA to read and log 4 registers (40802-40805) on my Sentron PAC3200, and then try to get a decimal from those four 2 byte registers.
    Does my other program polling the PAC3200, powerconfig, have to be offline to communicate? I tried that with no change.
    Are you able to get me on the right track, please?

    #6443
    Mikhail
    Moderator

    I cannot even get the test project with KpModbus_Adam6015.xml to run. I get “error” instead of normal and communication error.

    If you provide screenshots, I will try to help you.

    Does my other program polling the PAC3200, powerconfig, have to be offline to communicate?

    If you use RS-485, the only one application can poll.
    If you use TCP, it depends on a particular device. Many devices support only 1 connection.

    #6446
    joeh6966
    Participant

    https://ibb.co/SVjQcc6
    https://ibb.co/bsLn2MJ
    Imgur not working today.
    I’m using ethernet to my router from the PAC3200.

    #6448
    Mikhail
    Moderator

    The provided screenshots don’t contain any error.
    Look for communication line log.

    #6451
    joeh6966
    Participant

    I got through your video and succeeded to get the same results that you did.
    However, I don’t see how to pick reading and writing times and how to save them to a log file.
    I only need to read 4 registers 5 times a day.
    Can I do that and have them recorded into a log?

    #6453
    joeh6966
    Participant

    https://ibb.co/Yf7Kjm9
    https://ibb.co/hWt77bB
    More success today.
    I got the Line Log to work well by adjusting the Device Template to “double (8 bytes”.
    Here is the Template snip. https://ibb.co/8N3g7nv
    Now that Rapid SCADA communicates with the PAC3200 meter, I see that I get a Send command and a receive data that is 7 and 10 bytes. I can take the last 8 bytes and put them in a converter and get a decimal conversion in Wh.
    I wish to get it to read and log once per hour and save it in a file that I can then convert to decimal, or convert to decimal first and save that once per hour.
    Do I need to try out the Automatic Control Module to get what I want?

    #6454
    manjey73
    Participant

    The idea is to write a formula and add the value to a file once an hour without using the auto control module

    #6455
    joeh6966
    Participant

    I guess that there is no built-in 64 bit double precision conversion in Rapid SCADA.
    It seems a daunting task to create my own.
    I can get a reading every hour and see them in Line Log, but there is all of the other communication messages in the way.

    #6458
    Mikhail
    Moderator

    I only need to read 4 registers 5 times a day.

    Set the period like written here to poll on time.

    #6459
    Mikhail
    Moderator

    Do I need to try out the Automatic Control Module to get what I want?

    I think you should use formulas.
    Do you get correct double value in Communicator?

    #6462
    joeh6966
    Participant

    I think that setting the time will give me one reading at that time, but I need 4 daily weekdays at least. 7,11,17,19 And once a month I need readings on the weekend because it’s month end on my hydro bill. I think that using a period of 1 hour will cover my needs there.
    As far as the formulas go, I get one reading of 4 two byte registers as I showed above in message 6453. I poll the 4 registers 802-805 with one request that is 12 bytes. The receive message is 7 and 10 bytes. So, the last 8 bytes out of the 10 is
    41 6A 61 BD 78 64 40 98. When I type them into FP converter, I get the right answer in watt-hours, but the converter had to do 3 swaps. Swap bytes, swap words, and swap double words.
    I haven’t gotten into it yet, but I believe that after the swapping, they are converted to binary, and then they can be deciphered into decimal using the floating point system.
    So, I might be able to do that using Libre Office Calc if it becomes necessary.
    https://ibb.co/mqQnDZ0

    #6465
    joeh6966
    Participant

    I set the time to 17:00:00 and the period to 01:00:00. It started to give the result every hour, but the even numbered readings, (18,20,22) have a communication error. And today I discovered that the Line Log is not working past 23:00:00 Jan.31. I expected it to run continuously.
    https://ibb.co/1d5RYxF
    https://ibb.co/37ctcwL

    #6470
    joeh6966
    Participant

    Today I am quite certain that my Rapid SCADA program is seriously compromised. Nothing works.
    Project PAC3200 has my real IP address in it as I put in, but it also has 127.0.0.1 in the server stats. https://ibb.co/RyfDBQv I didn’t put that in.
    The older project Modbus test now has info from the PAC3200 project that was created later. https://ibb.co/4p8b7Gz
    More errors https://ibb.co/RyfDBQv
    https://ibb.co/t3VQ1pN
    https://ibb.co/kD8g7fZ
    I guess that I can reinstall and start over again. I did get to where I wanted to with getting a reading every hour, but it missed every second hour and then crashed.

    #6479
    manjey73
    Participant

    For example here you have everything perfectly readable
    https://ibb.co/Yf7Kjm9

    When you read once an hour, you may need to uncheck “Stay connected” in the line settings. Actually, the problem is not in Scada, but perhaps in the communication settings, the settings of the device itself (it does not keep the socket open for so long and closes it by timeout), and so on.

    #6480
    manjey73
    Participant

    https://ibb.co/TvQBh9y

    It seems that you don’t even need to rearrange the bytes, I entered a decimal number, and the calculator showed a different representation. “Most accurate representation”

    http://floatingpoint.ru/value/double/416A61BD7388E68A

    • This reply was modified 4 years, 2 months ago by manjey73.
Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.