MVP 2022 kratmel Posted February 18, 2019 MVP 2022 Report Share Posted February 18, 2019 I need to control the power supply unit for the galvanic process through the Modbus RTU network via Vision PLC.Now for network operation, the power supply uses non-standard Modbus user function 65-69 and a program running on a computer with Win7 OS.I have a detailed description of these user function commands 65 - ModBus_GetDeviceInfo 66 - ModBus_GetStatus 67 - ModBus_SetLimitsAndPower 68 - ModBus_GetAddonStatus (65 -68 edited by mod to not be "links", see below) 69 – ModBus_SetAddon but as far as I know, it's not possible to modify the standard Modbus commands in the Visilogic environment. Now i can read some "read only" parameters via sandard Modbus function codes but no write possible. Function code 65-69 is used to enable remote control and write "U" and "I" setpoint to power supply. The question: it is possible to create a Modbus like protocol with user defined function code? Quote Link to comment Share on other sites More sharing options...
hotwires Posted February 19, 2019 Report Share Posted February 19, 2019 The serial protocol block should facilitate you "home brewing" MODBUS structured write commands. @Joe Tauser would be the expert in that arena. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted February 19, 2019 MVP 2022 Report Share Posted February 19, 2019 HI Kratmel, I get highlights hovering on your "modbus links", but nothing else happens. Have you got descriptions linked to them that aren't working properly? Hots is correct. Perhaps you have done this already in your descriptions that aren't showing, but I would be using a serial monitor b/n the device and the PC to find exactly what is being sent to and fro, so that you have the exact string structure you are needing to implement. cheers, Aus Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted February 19, 2019 Author MVP 2022 Report Share Posted February 19, 2019 Sorry for "links", it is just copy past from msword document (I tryed to make plain text but can not do that - if it possible please correct to plain text). Description of 65-67 user function commands in attached pdf. In txt - copy from online log window on PC for this commands, 68 and 69 do not use by program running on a computer with Win7 OS. I see it in online log window. It used only by manufacturer for power supply modules configuration. RS485 engl.pdf 65_67log.txt Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted February 20, 2019 MVP 2022 Report Share Posted February 20, 2019 Hotwires is correct - you're going to have to roll your own "Modbus" command block. Modbus command codes only go up to 24, but it shouldn't be too hard to make your own data frames- http://modbus.org/docs/PI_MBUS_300.pdf The Protocol Send block has a checksum calculator built in- I can't tell you exactly how to do it as I've not done it myself. Have a go and post your program and we'll see what we can do to help. Joe T. Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted February 20, 2019 Author MVP 2022 Report Share Posted February 20, 2019 Thank you Joe Now i have a direction where I need to move. The main thing is to make it possible to switch the power supply to the remote control mode. Now I'm already able to set the parameters, but I need to turn it on and off without using the switch on the front. I think your tip will help and everything will work. Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted February 23, 2019 Author MVP 2022 Report Share Posted February 23, 2019 I was able to run remote control using the FB protocol.The main problem was to understand how to send bytes in the correct order.I found the solution in the topic - send a stream from MI vector. Below, I show how the message "65" for #15 Modbus power supply has been generated: 111 three bytes of message, 22 checksum.The result in the terminal window is 15 65 1 176 83. I am currently working on programming the power management interface.Thanks again for the help. P.S Checksum in FB Protocol that is used --- CRC-16_B , CRC-16_L - gives the reverse order of bytes in the message (I used 2 bytes of checksum). Format must be Binary Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted February 23, 2019 MVP 2022 Report Share Posted February 23, 2019 Thanks for the update! Joe T. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.