Jump to content

Visilogic - Modbus RTU 65-69 user function possible?


Recommended Posts

  • MVP 2023

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?

Link to comment
Share on other sites

  • MVP 2023

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

Link to comment
Share on other sites

  • MVP 2023

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

Link to comment
Share on other sites

  • MVP 2023

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-

image.png.cef6cc450f45de4a59dcc3e5cda5eda4.png

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.

 

 

Link to comment
Share on other sites

  • MVP 2023

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.

Link to comment
Share on other sites

  • MVP 2023
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.

FB_protocol1.thumb.JPG.946c6f53450002b6adf4d8a3c03d7f29.JPG
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
 
FB_protocol2.JPG.db428141167636cb8bccf9bbaea93dd2.JPG
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...