Jump to content

Recommended Posts

  • MVP 2023

Is it RX-TX cable connected properly?

In Example you can see 570 modbus  loopback test project with modbus setup for one V570 with two rs232 port connected TX-RX, RX-TX.

Use this example for test connection with two device. Both of them can be master or slave on different com port.

Link to comment
Share on other sites

4 hours ago, kratmel said:

Is it RX-TX cable connected properly?

In Example you can see 570 modbus  loopback test project with modbus setup for one V570 with two rs232 port connected TX-RX, RX-TX.

Use this example for test connection with two device. Both of them can be master or slave on different com port.

Hi, I have a connection to the slave PLC as the other parts of my program do work. My main problem is that i cant find a way to read the Save's MI. Ive tried using the FB's but i cant seem to make it work. 

Thanks for the respnse!

Link to comment
Share on other sites

1 minute ago, Flex727 said:

To read an MI, which is a 16-bit integer, you need to use the R.H.R. #3 function (Read Holding Registers). You are trying to use R.C. #1 (Read Coils). Coils are single bits (MBs).

Hi, thanks for the answer.

The Read coil function block is just another part of my assignment. I will try the Read holding registers FB. 😃

Link to comment
Share on other sites

 

10 minutes ago, Flex727 said:

To read an MI, which is a 16-bit integer, you need to use the R.H.R. #3 function (Read Holding Registers). You are trying to use R.C. #1 (Read Coils). Coils are single bits (MBs).

I tried using the FB you told me about and i was wondering if i want to read the Slave MI10, would this be the way of doing it?

Thanks for the answers!

 

Read coil.png

Link to comment
Share on other sites

3 minutes ago, Flex727 said:

Yes, but two things:

1) Don't use SB 7, use SB 15. SB 7 is a square wave - you want a positive transition.

2) Place an inverted contact of MB 0 (Function in Progress) between SB 15 and the MODBUS read FB.

Will do! Thanks for the answers

Link to comment
Share on other sites

On 3/4/2020 at 7:35 PM, Flex727 said:

Yes, but two things:

1) Don't use SB 7, use SB 15. SB 7 is a square wave - you want a positive transition.

2) Place an inverted contact of MB 0 (Function in Progress) between SB 15 and the MODBUS read FB.

I tried, and it worked! But now my force coils are not working anymore, ive tried rearranging them in my program. But either the RHR FB works or the Force coil FB works. They dont seem to work together. Ive also tried adding subroutines but it still doesnt work. Hopefully you can help me.

Link to comment
Share on other sites

  • MVP 2023

Did you try placing a positive transition contact of SB 7 in front of one and a negative transition contact of SB 7 in front of the other?

That should work in your case, but the proper way to do this type of communication is to set a bit periodically and place the following in series:

Direct contact of the set bit,  inverted contact of the function in progress bit, the comm FB, then a reset of the first bit. That allows the function to "wait" while any other communication is in progress.

Link to comment
Share on other sites

17 hours ago, Flex727 said:

Did you try placing a positive transition contact of SB 7 in front of one and a negative transition contact of SB 7 in front of the other?

That should work in your case, but the proper way to do this type of communication is to set a bit periodically and place the following in series:

Direct contact of the set bit,  inverted contact of the function in progress bit, the comm FB, then a reset of the first bit. That allows the function to "wait" while any other communication is in progress.

I will try that, but now i have another problem. My slave PLC has status 2(Reply error) and i havent found out a way to fix it yet. Thanks! Aditionally it keeps connecting and reconnecting. And sometimes it displays status 7 wich i found out to be a data sync error. 

Edited by a99900s
adding more text
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...