Jump to content

Recommended Posts

  • MVP 2023
Posted

You post some ladder code for V700.

But you must post in this topic information about both side of connection (V700 and Raspberry PI4) and for what purpose this connection needed.

 

  • MVP 2023
Posted

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.

  • MVP 2023
Posted

It's also much more helpful if you attach your program to your post - see the "choose files..." at the bottom of the typing window.  A lot of times if I can open the program I can make some commented edits and re-post the program.

Joe T.

Posted

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

Posted

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.

 

  • 4 weeks later...
Posted

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

  • MVP 2023
Posted

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.

Posted

Thanks for the Assistance. Much Appreciated.

I managed to connect, receive and  send data between the PLC and raspberry with the Raspberry Pi as the master.

Again, Thanks for you r help...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.