7/23/2010 8:06 PM | |
Posts: 8946 Rating: (999) |
AN M4.0 = M4.0 |
This contribution was helpful to1 thankful Users |
7/25/2010 6:11 AM | |
Joined: 10/7/2005 Last visit: 1/24/2025 Posts: 3032 Rating: (1059)
|
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: 1/24/2025 Posts: 3032 Rating: (1059)
|
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 to1 thankful Users |
4/18/2012 2:00 PM | |
Posts: 270 Rating: (53) |
Seems like you are two years too late, bro... |
This contribution was helpful to2 thankful Users |
Follow us on