Javier Galaz Posted January 28, 2022 Report Posted January 28, 2022 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.
MVP 2023 kratmel Posted January 28, 2022 MVP 2023 Report Posted January 28, 2022 Plese read this topic And find in Help file "Vision700 - Using Ethernet"
MVP 2023 Flex727 Posted January 28, 2022 MVP 2023 Report Posted January 28, 2022 Remove the Protocol TCP/IP Configuration block if you're using MODBUS TCP.
Javier Galaz Posted January 29, 2022 Author Report Posted January 29, 2022 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. If relevant, I'm trying to read using a python library called pymodbus, https://pymodbus.readthedocs.io/en/latest/readme.html
MVP 2023 Flex727 Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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.
MVP 2023 Flex727 Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 16 minutes ago, Javier Galaz said: By the way, where did you find this?
Javier Galaz Posted January 29, 2022 Author Report Posted January 29, 2022 8 minutes ago, Flex727 said: Yes, that is the default, but when you perform a Socket Initialization, that changes the properties. So, if I understand correctly, if I use this: like this I would get Modbus port in port 502 instead of 20258 which is the default?
Javier Galaz Posted January 29, 2022 Author Report Posted January 29, 2022 3 minutes ago, Flex727 said: By the way, where did you find this? In the help, the page that Kratmel pointed out: "Vision700 - Using Ethernet". At the bottom to be more precise.
MVP 2023 kratmel Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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.
Javier Galaz Posted January 29, 2022 Author Report Posted January 29, 2022 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. both numbers update every time I send a modbus request, but my client receives nothing.
MVP 2023 Flex727 Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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.
MVP 2023 Flex727 Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 2 hours ago, Javier Galaz said: So, if I understand correctly, if I use this: like this I would get Modbus port in port 502 instead of 20258 which is the default? Yes, that is correct.
MVP 2023 Joe Tauser Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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.
MVP 2023 Joe Tauser Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 4 minutes ago, Joe Tauser said: Can you upload the whole thing so we can have a look? Sorry - I didn't see that you did that in your first post. It was embedded in a paragraph as opposed to standing alone. Joe T.
Javier Galaz Posted January 29, 2022 Author Report Posted January 29, 2022 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.
Javier Galaz Posted January 29, 2022 Author Report Posted January 29, 2022 Just now, Joe Tauser said: Sorry - I didn't see that you did that in your first post. It was embedded in a paragraph as opposed to standing alone. Joe T. I've actually made some changes with the help I've gotten in this thread. Here's an update. ENAMI HMI 2 Solo Modbus.vlp
Javier Galaz Posted January 29, 2022 Author Report Posted January 29, 2022 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.
Javier Galaz Posted January 29, 2022 Author Report Posted January 29, 2022 17 minutes ago, Flex727 said: Yes, that is correct. It doesn't work, I can't even connect to port 502. Without that FB I can establish a connection to 20258, even if only to get empty responses.
MVP 2023 Flex727 Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 Did you confirm in INFO Mode that the Socket was actually set to port 502?
MVP 2023 Joe Tauser Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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. 1
MVP 2023 Joe Tauser Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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.
MVP 2023 Ausman Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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
MVP 2023 Flex727 Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 Just as a data point, I have used V700s as MODBUS TCP slaves on port 502 for SCADA systems many, many times without incident, though not using 9.8.94 - mostly 9.8.65, as mentioned by Joe.
MVP 2023 Flex727 Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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.
MVP 2023 Ausman Posted January 29, 2022 MVP 2023 Report Posted January 29, 2022 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?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now