Slick togggle in Twido IL? Or am I up in the night?

TConnolly

Lifetime Supporting Member
Join Date
Apr 2005
Location
Salt Lake City
Posts
6,152
I might have just stumbled on a super slick way to create a toggle in the TWIDO. I downloaded a manual and was looking at the IL instruction set for this thread when it occurred to me that

LDR %I0.0
XOR %Q0.0
ST %Q0.0

should create a toggle.

I am honestly not very familiar with the TWIDO instruction set but if I understand the manual correctly this should work.

Can anyone who is more familiar with the Twido or who has one to test it on confirm this?
 
That works if you don't mind having %Q0.0 toggle while %I0.0 is on

You need to add the one shot feature
LDR %I0.0
ANDN %M0.0
XOR %Q0.0
ST %Q0.0
LD %IO.0
ST %M0.0

If the Twido has PUSH and POP then use this.
LD %I0.0 // LOAD ONCE SO NOT AFFECTED BY CHANGING STATE LATER
PUSH
ANDN %M0.0
XOR %Q0.0
ST %Q0.0
POP
ST %M0.0
 
Unless I am mistaken LDR %I0.0 is already a one shot - it loads a 1 only on the rising edge of the input.

Either way the XOR is a cool way to do it. Thanks for confirming the method.
 
Last edited:

Similar Topics

-------------------------------------------------------------------------------- Hi I'm working on a personal program for my kids. I bought 8...
Replies
8
Views
2,374
I forgot, what position does the switch have to be in in order to upload and save the program while the machine is running using R/S Logix 500?
Replies
1
Views
1,846
I hope this isnt on already here but I need simple ladder one line with normally open(part present) one closed(while counter not at 250) it...
Replies
9
Views
4,532
Does anyone happen to know how many amps the P2 power supply can output at 24 volts? Thanks
Replies
5
Views
3,971
Hey all in the middle of no where. I have an old computer running win98 with a seriel port. Use this with my pic with no problems at all on my...
Replies
15
Views
3,491
Back
Top Bottom