Marko SramlPLC Posted December 15, 2023 Report Share Posted December 15, 2023 Hello everybody! I have a problem and I don't know how to solve it. I use ethernet communication between 2 Unistream PLCs. I use 1 PLC as MASTER and other for SLAVE. If I SET the MASTER output , SLAVE's input becomes SET. If I physically disconnect ethernet connection between them, SLAVE still gets "1" on it's input, even if the ethernet "connected bit" is "0". I would like that if the connection between them is lost, all SLAVE inputs become "0". I tried to reset them, when the ethernet "connected bit" becomes "0" but it doesn't work. Is there any way to solve this problem? Thank you for your help! Marko. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted December 15, 2023 MVP 2023 Report Share Posted December 15, 2023 I don't use UniLogic often enough to remember enough detail to answer your question definitively, but one universal solution is to incorporate a "heartbeat" function within your communications. If the heartbeat stops changing for the appropriate period of time, then reset your bits (or registers). Link to comment Share on other sites More sharing options...
dierkens Posted December 15, 2023 Report Share Posted December 15, 2023 Once that register is set to a value it will continue to have that value until something else acts on it. You have two choices; you can either clear the register on a timed basis, perhaps just before the other PLC sets it, or you can have a routine that 'pings' or keeps track of the communication between the two. This can be in the form of a heart beat setup where one PLCs set a register to the a 1; the other sets sit a 0 and then if the heart beat stops you know the comms has gone down. There are a ton of ways to go about it. Link to comment Share on other sites More sharing options...
Gabriel Franco Posted December 15, 2023 Report Share Posted December 15, 2023 What do you mean with slave input?, is it a register? What protocol are you using? Maybe the subroutine where you reset it is not being called. Link to comment Share on other sites More sharing options...
Marko SramlPLC Posted December 18, 2023 Author Report Share Posted December 18, 2023 Under the section "Global", in the "EIP Scanner Node Struct" is a "Connected Bit" which represents the state of ethernet communication. I tried to use it as an inverted contact and reset numeric inputs, but it doesnt work. When the connection is lost, "Connected bit" becomes "0", but I can't reset the IO inputs. I think I sould try to copy IO inputs from ethernet protocol to a new struct and try to reset this new struct. Link to comment Share on other sites More sharing options...
pascal Posted December 19, 2023 Report Share Posted December 19, 2023 Marko, you can't reset an input.... an input is not like a self made bit. Like you said, you have to copy the state of your inputs into another tag(struct) and reset your tag.... Link to comment Share on other sites More sharing options...
Marko SramlPLC Posted December 20, 2023 Author Report Share Posted December 20, 2023 @pascalyou are right, I tried like you said and It does the job that I want. Thank you all! Best regards, Marko. 1 Link to comment Share on other sites More sharing options...
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