General Category > Support Questions

How to Avoid PLC and PC timeouts

(1/2) > >>

paintman:
Hello,

I am using advancedhmi v35 and visual studio 2022, I wrote a VB.net script to continuously monitor data on the PLC (a GuardLogix 5380 Safety Controller). It works very well, but we run into an issue where the line will go on break for lunch etc and during that time the HMI says it has lost connection to the PLC. I am connected through an EhternetIPforCLXCom connection, I even setup a counter function that continuously runs to keep the EthernetIPforCLXCom1_DataReceived sub active; however, it still times out and when the line is started back the HMI never reconnects. Is there a better way to perform a handshake to allow the PC and PLC to not lose the connection between the two?
I though about creating a section on the PC that will reset the counter when it reaches a certain level. Any advice would be greatly appreciated.

Archie:
Are you using v3.99x or 3.99y ?

How are you reading data in the code? Read or BeginRead? How frequently are you reading?

paintman:

--- Quote from: Archie on February 28, 2024, 04:08:32 PM ---Are you using v3.99x or 3.99y ?

How are you reading data in the code? Read or BeginRead? How frequently are you reading?

--- End quote ---

I am using 3.99y, as for reading the data im not utilizing either of those (im fairly new to vb in general). I am just using the mydriver.read/write to pull the information from the plc. So it just reads during each scan cycle. Would begin read be better?

Currently in the operation when it sees a release bit it goes through a few nested if loops then will write the data to a text file which is linked to a list view and it its a part number its never seen before itll write the information to the PLC array

Archie:
BeginRead is an asynchronous command which takes a lot more overhead to use. I would only use it if you need non-blocking code.

If you are just monitoring values for change, I would use the DataSubscriber

paintman:
Does the datasubscriber work for multiple PLC tags or is it for a single tag per subscriber? Currently the most important one I am trying to read is an array of tags with 8 elements to each tag.

Or would it be best to just setup the data subscriber to read the stop release bit and then run the full sequence of code?

Also does the datasubscriber read two way changes? Like if the bit changes from 0 to 1 it runs the sequence then when it changes back from 1 to 0 it reads again?

Navigation

[0] Message Index

[#] Next page

Go to full version