Jump to content

V700 TCP ip modus ladder . Trying to send Temp reading to Raspberry Pi4 and receive an answer of 1 or 0


Recommended Posts

  • MVP 2023

Also, I can't see all of it but your code for the Socket Connect appears to be poor form. Check the example projects to see the best methodology. Basically you want to set a bit to connect after the MODBUS configuration block and use a direct contact of that bit to activate the Connect block. At the end of the Connect block, the connect bit should be reset.

Your code will instantly try to re-connect upon closing the Socket.

Link to comment
Share on other sites

Good  Morning,

Thanks for the replys....

I need  to send via TCP IP  a temperature reading 4 digits eg  (2545) Mi 50 and read back to Mi 571. 

This information needs to be send to and received returned back from a Raspberry Pi4.

I need to know the logic also in the Raspberry Pi.

Any help would be most appreciated.

I attached my program..

 

SNOWLEES main 18012022.vlp

Link to comment
Share on other sites

Hi,

We are not experienced in Passperry Pi.

1. Do youuse any MODBUS Library at Raspberry Pi side?

1.1. How it is configured?

2. All sockets at V700 side are configured as SLAVE.

To use CONNECT, used socket should be configured as MASTER.

3. MB 901 has no coil. So when it is set?

4. You should not send CONNECT at each PLC Scan.

Do it with timer 1 sec.

5. Check in INFO mode MODBUS Socket status.

6. If socket status is CONNECTED - activate MONITOR->HEX for MODBUS socket and check send/receive content.

This will show you what PLC send to RPi and what PLC receive back.

 

Link to comment
Share on other sites

  • 4 weeks later...

Hi Guys, I am still trying to get a connection between my V700 and a RaspberryPi4.

I believe that I have set up the Raspberry Pi as a Master.

I believe that I have set up the V700 as a slave.

I have included both..

I am trying to connect Master/Slave TCP IP Modbus 

I want to read Mi 50 , a temperature reading and get an answer to Mi570 

Any help will be much appreciated

SNOWLEES main 14022022.vlp Test 1.py

Link to comment
Share on other sites

  • MVP 2023

It looks like you're using Socket 7 for your Raspberry Pi communications. I see the following problems:

1) You're trying to connect from the slave (the V700). The Master should do the connection. The Slave should only be passively scanning (after configuring for MODBUS).

2) You're trying to perform communication operations with Socket 7 before initializing it.

3) Your MODBUS configuration appears to be configuring socket 2 instead of socket 7.

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