7/23/2010 8:06 PM | |
Posts: 8946 Rating:
|
AN M4.0 = M4.0 |
This contribution was helpful to
1 thankful Users |
7/25/2010 6:11 AM | |
Joined: 10/7/2005 Last visit: 9/5/2024 Posts: 3018 Rating:
|
I wouldn't dear Catch Me If You Can, as it will not work this way.
There sure is and it is the way IBN-Service described which will of course also work with your DB bit as follows: [code]AN DB10.DBX 0.0 =DB10.DBX 0.0 [/code]
Not too sure why you would need to do this for many different bits. I'd only create one bit (typically at the start of OB1) that is ON for one scan, OFF for the next, ON for the next and so forth and use this bit wherever I would need it in the program. I hope this helps |
Cheers |
|
7/25/2010 1:04 PM | |
Joined: 10/7/2005 Last visit: 9/5/2024 Posts: 3018 Rating:
|
Hello again Catch Me If You Can
"AN M 4.0" checks whether the state M 4.0 is "0". If this check is True (i.e. M 4.0 is 0) it sets the RLO (Result of Logic Operation) to 1. If this check is False(i.e. M 4.0 is 1) it sets the RLO (Result of Logic Operation) to 0. "= M 4.0" simply assigns the status of the RLO to M 4.0 and as such M4.0 toggles its state every scan (or every time this piece of logic is executed). Note too that F1 will give you context sensitive help for every instructions.
I see, in that case you can still use the proposed logic for any bit that you need to toggle, but need to bear in mind that a cyclic toggling will be way too fast for the TP to see the change of state (and I doubt you want to trigger a report every OB1 scan). The way to go here is to execute this toggle logic based on a condition (e.g. jump over if when not needed and run trough it once when you need to toggle the bit). |
Cheers |
|
This contribution was helpful to
1 thankful Users |
4/18/2012 2:00 PM | |
Posts: 270 Rating:
|
Seems like you are two years too late, bro... |
This contribution was helpful to
2 thankful Users |
Follow us on