Jump to content

[SOLVED] V700 Modbus TCP/IP slave


Recommended Posts

Hi, I've just joined this forum because I have a problem and I can't find the solution.

I've a V700 HMI with a V200-18-E2B Snap-in I/O module.

I need to use this HMI as a TCP/IP slave using port 502.

I have a ladder that works on V130, but it doesn't work on this V700.

could you please help me?

ENAMI HMI 2 Solo Modbus.vlp is the trimmed down version of the program, because I wanted to remove every other variable in order to try to debug my program, I believe this should let me read and write every available modbus address (coils, input registers, etc), but when I try to read coils I get 0 bytes read.

 

Link to comment
Share on other sites

18 hours ago, kratmel said:

Plese read this topic

And find in Help file

"Vision700 - Using Ethernet"

Thanks for your reply, I've read that and found more info, however I still receive 0 bytes responses.

I've read that the V700 socket 2 port is actually 20258 and not 502. So I've changed my modbus client accordingly.

My SDW 61 register is actually incrementing every time I try to read coils (1), read input registers (3), or read holding registers (4), but I still get 0 bytes in response.

image.png.c15a1278b908167da8f04acf1c8cd031.png

If relevant, I'm trying to read using a python library called pymodbus, https://pymodbus.readthedocs.io/en/latest/readme.html

Link to comment
Share on other sites

  • MVP 2021
7 minutes ago, Javier Galaz said:

I've read that the V700 socket 2 port is actually 20258 and not 502. So I've changed my modbus client accordingly.

Yes, that is the default, but when you perform a Socket Initialization, that changes the properties.

Link to comment
Share on other sites

  • MVP 2021
1 hour ago, Javier Galaz said:

I'm trying to read using a python library

Sometimes in communication with non Unitronics Modbus device register address must be  one unit less than written in the documentation. That is, to read the 0001 register you need to take 0000 address. Please read this topic Joe Tauser post.

 

Link to comment
Share on other sites

I've read that, thank you for pointing that out, however, pymodbus uses addresses starting with 0, just like Unitronics Modbus.

Anyway if I was reading coil number 1 using address 0001 it should still give me register number 2 and not empty response.

I've tried using Modbus poll and CAS Modbus scanner (I saw in that thread that someone used them to some degree of success), and they both gave me timeout.

using the same page in Help you suggested, namely "Vision700 - Using Ethernet", I found that It receives packages and is supposed to be sending them too.
image.png.8256469e77660969bbf45a29d35937ca.png

both numbers update every time I send a modbus request, but my client receives nothing.

Link to comment
Share on other sites

  • MVP 2021
2 hours ago, Javier Galaz said:

In the help, the page that Kratmel pointed out: "Vision700 - Using Ethernet". At the bottom to be more precise.

Thanks. Oddly, that does not appear in my version of the Help file that came with VisiLogic 9.8.94, nor is the operand description in the operands list in VisiLogic.

Link to comment
Share on other sites

  • MVP 2021
28 minutes ago, Javier Galaz said:

I've tried using Modbus poll and CAS Modbus scanner

This is a very good idea as it isolates troubleshooting to one side of the conversation.

I would try socket status request #28 to verify the socket is actually in modbus mode.

You've posted snippets of your PLC program.  Can you upload the whole thing so we can have a look?

 

Joe T.

Link to comment
Share on other sites

7 minutes ago, Flex727 said:

Thanks. Oddly, that does not appear in my version of the Help file that came with VisiLogic 9.8.94, nor is the operand description in the operands list in VisiLogic.

 I have the same VisiLogic version, the Help version is V300-21-G23 Rev: 3.00.

The operand descriptor decscription is also blank, but the number increases when I send a request.

Link to comment
Share on other sites

11 minutes ago, Joe Tauser said:

This is a very good idea as it isolates troubleshooting to one side of the conversation.

I would try socket status request #28 to verify the socket is actually in modbus mode.

You've posted snippets of your PLC program.  Can you upload the whole thing so we can have a look?

 

Joe T.

I've done that, I get a 1 with request #28, and according to the help page that corresponds to modbus mode.

Link to comment
Share on other sites

  • MVP 2021

And of course I haven't installed 9.8.94 yet, as 9.8.80 and up turn Windows explorer.exe on my computer into a babbling idiot that requires the vlp_auto_file registry fix.  I'll download and use the version swapper to look at the program.

@Javier Galaz - Unitronics doesn't broadcast this, but all of us old schoolers use 9.8.65 for our daily worker as it is extremely stable.

Joe T.

  • Like 1
Link to comment
Share on other sites

  • MVP 2021

I installed version 9.8.94 and was able to open the program.  I also looked at the V700 Example for Modbus TCP slave and it does not assign port 502 to socket 2, which is a conflict of the Help description of default port 20258 as you describe.

45 minutes ago, Javier Galaz said:

Without that FB I can establish a connection to 20258, even if only to get empty responses.

Are you using one of the canned Modbus masters as mentioned above?  Have you loaded the V700 with some data?  I usually load up MI 0.. MI9 with the values 1 to 10 when establishing first contact and set the Modbus master to read 10 registers starting with 40001.

 

I wonder if the Creators even tested this example.  I don't have a V700 in my home smoke-filled workspace cave but I can grab one from the office.  I'll have to get back to you on this.  I am now extremely curious.

Joe T.

Link to comment
Share on other sites

  • MVP 2021

I'm assuming you've tried a different network ID other than 255. I don't use TCP for modbus but this looks odd.  Someone explain the 255 ID use to me in this case...I'd like to learn something.  Why do a general ask and not a specific one?

And Joe, I only have 8.65 as you mention, but by trying to open the file I get an error message and things close on screen, you then have to go to task manager to actually end the task, double click the project again and up come other messages along the way to opening the project ok.  This has always been my consistent way to read later version projects.  Perhaps some info gets lost along the way that is only available in later versions, but it will show me basics.

cheers, Aus

Link to comment
Share on other sites

  • MVP 2021
2 minutes ago, Ausman said:

I'm assuming you've tried a different network ID other than 255. I don't use TCP for modbus but this looks odd.  Someone explain the 255 ID use to me in this case

To the best of my knowledge, the network ID is not used for MODBUS TCP. I've always just left it at 255.

3 minutes ago, Ausman said:

And Joe, I only have 8.65 as you mention, but by trying to open the file I get an error message and things close on screen, you then have to go to task manager to actually end the task, double click the project again and up come other messages along the way to opening the project ok.  This has always been my consistent way to read later version projects. 

That did not work for me going from 9.8.91 to 9.8.94. It used to work for earlier versions.

I'm hoping 9.8.94 fixed some of the glaring problems with 9.8.91 and will be trying it out on my next major project.

Link to comment
Share on other sites

  • MVP 2021

Thanks Flex.

I know I'm a dumbo on this sort of thing, but one difference I see b/n the example and this project is that there is no Slave TCP address reference in the IP config area.  In the example there is.  Does this matter?

Link to comment
Share on other sites

  • Javier Galaz changed the title to [SOLVED] V700 Modbus TCP/IP slave

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...