News:

  • October 02, 2026, 03:26:59 PM

Login with username, password and session length

Author Topic: Multiple Remote I/O's  (Read 35229 times)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Multiple Remote I/O's
« Reply #15 on: July 31, 2019, 05:53:05 PM »
Did it go to Run mode? Then it worked...otherwise it wouldn't have. The master continues to report errors as long as the slave doesn't talk. It scans at a significantly reduced rate while failed.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Multiple Remote I/O's
« Reply #16 on: August 01, 2019, 12:08:28 AM »
I've attached the section from the user manual indicating how slave errors can be cleared (or this is how I read this section of the manual). Unfortunately I cannot get errors to clear by the method shown in the user manual. It would be nice for someone from Host to verify that this is functioning correctly. In my case (as in yours) I tried to clear the #4 communication error by the method shown in the user manual and cannot get the command to reset the $EthIOMaster.Slave0Error from 4 to 0.

What does seem to work is what I have shown in the second attachment on line 11. A move command can be issued to change the $EthIOMaster.Slave0Error from a 4 to a 0 as shown. As for your case, your line 5 is not correct. It is saying in the event of a communication fault (#4 error) clear the communication fault. Logically this doesn't make sense, you can't clear the error while there is an error. What I've shown in line 11 does seem to clear the fault as long as there currently is no fault. In the event that you try to clear the fault using this method and there is still a fault, the fault status will change briefly to 0 and then will time out and set $EthIOMaster.Slave0Error back to 4.

If you use the method I've shown on line 11 and the $EthIOMaster.Slave0Error goes back to 4 then there is some type of communication issue between the master and slave that is causing the slave to timeout. This will have to be resolved before you can reset it.

Concerning the issue of another setting that you need to change for the slave, I don't think there is one. I think the problem is that there is an unresolved communication issue between the master and the slave.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Multiple Remote I/O's
« Reply #17 on: August 01, 2019, 12:39:44 AM »
I need to confirm, but I think .ResetSlaveStatus is to clear I/O warnings and errors in the slave itself...stuff like module failures and broken transmitters in the slave, not comm to the slave. The slave comm error states in the master will automatically clear when the slave starts talking. There isn?t anything required to fix comm errors.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

EDurako

  • Sr. Member
  • ****
  • Posts: 52
Re: Multiple Remote I/O's
« Reply #18 on: August 01, 2019, 09:05:40 AM »
I need to confirm, but I think .ResetSlaveStatus is to clear I/O warnings and errors in the slave itself...stuff like module failures and broken transmitters in the slave, not comm to the slave. The slave comm error states in the master will automatically clear when the slave starts talking. There isn?t anything required to fix comm errors.

Thanks for checking BobO, I patiently await your reply, I have also had no luck just as RBPLC expressed.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Multiple Remote I/O's
« Reply #19 on: August 01, 2019, 09:44:32 AM »
Thanks for checking BobO, I patiently await your reply, I have also had no luck just as RBPLC expressed.

As I remembered, that triggers a command to the slaves to clear relevant module status. It has nothing to do with clearing errors relating to communicating with the slaves.

I came in to the conversation late, so what exactly isn't working as you expect?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Multiple Remote I/O's
« Reply #20 on: August 01, 2019, 10:39:07 AM »
I need to confirm, but I think .ResetSlaveStatus is to clear I/O warnings and errors in the slave itself...stuff like module failures and broken transmitters in the slave, not comm to the slave. The slave comm error states in the master will automatically clear when the slave starts talking. There isn?t anything required to fix comm errors.

I think part of the confusion (for me anyway) was that when I read the documentation about how to reset errors using the .ResetSlaveStatus method, I was under the impression that it would also reset the $EthIOMaster.Slave0Error error as well. You're indicating that .ResetSlaveStatus is to clear other types of errors and not those associated with comms issues. If $EthIOMaster.Slave0Error is not cleared by using .ResetSlaveStatus  (at least not in the case of a #4 timeout error) what is the preferred method for clearing this error through logic? Is it by moving a 0 to $EthIOMaster.Slave0Error as I had shown in a prior post?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Multiple Remote I/O's
« Reply #21 on: August 01, 2019, 10:43:45 AM »
I think part of the confusion (for me anyway) was that when I read the documentation about how to reset errors using the .ResetSlaveStatus method, I was under the impression that it would also reset the $EthIOMaster.Slave0Error error as well. You're indicating that .ResetSlaveStatus is to clear other types of errors and not those associated with comms issues. If $EthIOMaster.Slave0Error is not cleared by using .ResetSlaveStatus  (at least not in the case of a #4 timeout error) what is the preferred method for clearing this error through logic? Is it by moving a 0 to $EthIOMaster.Slave0Error as I had shown in a prior post?

It isn't necessary to clear SlaveNError unless you want to. It just stores the last error and has nothing to do with the execution. And yes, just write it to 0.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Multiple Remote I/O's
« Reply #22 on: August 01, 2019, 11:03:32 AM »
Thanks BobO. Maybe I've missed something in the documentation, but how would you get the fault status (0 or 1) of a specific slave using the $EthIOMaster.SlaveErrors without using a bunch of comparisons? What I want to do is something like: $EthIOMaster.SlaveErrors[0] to determine if slave 0 has a fault on it but this does not appear to be correct syntax? What would be the correct way to do this, or is there a way? I'm probably missing something simple here.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Multiple Remote I/O's
« Reply #23 on: August 01, 2019, 11:14:38 AM »
Thanks BobO. Maybe I've missed something in the documentation, but how would you get the fault status (0 or 1) of a specific slave using the $EthIOMaster.SlaveErrors without using a bunch of comparisons? What I want to do is something like: $EthIOMaster.SlaveErrors[0] to determine if slave 0 has a fault on it but this does not appear to be correct syntax? What would be the correct way to do this, or is there a way? I'm probably missing something simple here.

Do-more cannot index or cast structure fields for reasons I won't bore you with. Just copy it a 16 bit register, then access. And let me add that when I said 16 bit register, that can also be 16 contiguous Cs. Just do a MOVE $EthIOMaster.SlaveErrors to C0:W. Note that the bit location must be on a 16 bit boundary...C0, C16, C32, etc.
« Last Edit: August 01, 2019, 11:19:01 AM by BobO »
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

EDurako

  • Sr. Member
  • ****
  • Posts: 52
Re: Multiple Remote I/O's
« Reply #24 on: August 01, 2019, 02:42:16 PM »

As I remembered, that triggers a command to the slaves to clear relevant module status. It has nothing to do with clearing errors relating to communicating with the slaves.

I came in to the conversation late, so what exactly isn't working as you expect?

Based on what I have read in this thread I am expecting the following to be true even though they contradict one another:

-If a slave is marked optional, by unchecking the "Slave must be online to enter RUN mode" then it should auto establish connection with the Master at some point without intervention.

-There is no way to clear a communication error or reset a communication link with a slave short of power cycling/rebooting the Master


I purposefully allowed Master to fully reboot and return a #4 Timeout error, then after the Slave had rebooted, we let it sit overnight. The next day we are now getting a #3 Signature Error. We were also unsuccessful at clearing this error.

I also expected that if the "CPU remains in RUN mode on slave error" is checked and the "Slave must be online to enter RUN mode" is not checked, then the Master would always be trying to reconnect any missing slaves every scan or every other scan from here to oblivion.


BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Multiple Remote I/O's
« Reply #25 on: August 01, 2019, 06:15:53 PM »
-If a slave is marked optional, by unchecking the "Slave must be online to enter RUN mode" then it should auto establish connection with the Master at some point without intervention.

-There is no way to clear a communication error or reset a communication link with a slave short of power cycling/rebooting the Master

I purposefully allowed Master to fully reboot and return a #4 Timeout error, then after the Slave had rebooted, we let it sit overnight. The next day we are now getting a #3 Signature Error. We were also unsuccessful at clearing this error.

I also expected that if the "CPU remains in RUN mode on slave error" is checked and the "Slave must be online to enter RUN mode" is not checked, then the Master would always be trying to reconnect any missing slaves every scan or every other scan from here to oblivion.

The first point is correct, the second is not...it will automatically reconnect. Once a base is logged out, the poll rate is reduced to 5 seconds, after the base is logged back in it returns to what you specified. Not sure what I said that led you to the conclusion that the master would not automatically reconnect, but I'm sorry if I confused you.

The signature error is related to a unique code that is assigned to a slave when we bring it online. It prevents two masters from talking to the same slave. Not sure what might be causing that, but let's resolve one thing at a time.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Multiple Remote I/O's
« Reply #26 on: August 02, 2019, 08:02:30 AM »
Thanks BobO. That's exactly what I was after in terms of casting. I tried both the copy and move method you described and they both worked.