09-30-2005 10:10 AM
09-30-2005 02:23 PM
Hi ICI,
Yes, you can use the radio button. Create the radio button and then connect your PLC bit number to the radio button value. The radio button value is left to right 1-3 in your case. 1 = Hand, 2 = Off, 3 = Auto. When the particular selection is made, it will be true (High or 1, all being the same). You can make the radio button transparent and place a graphic HOA Display with multistate on top it.
Good Luck!
Butler
09-30-2005 06:12 PM
09-30-2005 06:49 PM
I thought you were just needing a single bit. If you need a specific value, you will need to setup a table or several values in an expression. I may not understand the problem but you should be able to use the radio.value, which is just number of the selection made (like 1-3). Make an expression with an IF statement corresponding to the value needed.
A dataTable can also be used but it is a little harder to setup but it is very powerful tool.
Butler
09-30-2005 07:02 PM
10-03-2005 12:24 PM
Yes, this does help but I'm not quite sure how to read your expression. We do not require a fail safe. Basically I need an expression that says, if radio_button =1 then N7:10 = 2, if radio_button = 2 then N7:10 = 0, if radio_button = 3 then N7:10 = 1. From looking at my Lookout Reference manual, do you use a "NIF" function or just an "IF" function. How does this look (our customer's PLC is over an hour drive away or I would just try different statements until I got it right), 'NIF(Radio_button=1, 2)' or 'NIF(Radio_button= 2, 0)' or 'NIF(Radio_button=3, 2)'.
I don't want to write to individual bits, they are used in the ladder logic. Based on what value is in N7:10 (0,1, or 2), the ladder uses what ever bit of N7:10 is true. Eg, if the radio button writes a value of 2 to N7:10, then the ladder logic uses N7:10_2 to bypass the "Auto" sequence and start the pump in the "Hand" mode.
10-03-2005 07:30 PM
10-03-2005 11:16 PM
As they say, a picture is worth a thousand words (exactly who ‘they’ are I’m not sure). So here is a source file (LKS) with examples of the HOA expressions for the Allan-Bradley PLC I so poorly tried to explain earlier. This way you can see a working example and do some testing. The two examples are:
1. Number the RadioButton object relative to HOA (1=Hand, 2=Off & 3=Auto) and adjust the number the in the expression writing to the PLC. N7:10= if(Radio1=1,2,if(Radio1=3,1,0))
2. Number the RadioButton object relative to the PLC (1=Off, 2=Auto, & 3=Hand) and write the value of the RadioButton directly to the PLC (minus one). N7:10= Radio2-1
Strip off the TXT extension (this site would not allow an LKS extension) to load into Lookout. I used a lot of expressions in the example because words are more descriptive than numbers. Note that you can click on the Hand, Off & Auto text above the indicator to change the current value as well as clicking the RadioButton directly. My suggestion is not to use the RadioButton directly, but to use the PushButtons to alter the value of the RadioButton. Also, you could easily use a Pot or DataTable instead of the RadioButton. I hope this clears up what I tried to explain previously.
FYI - the function NIF (numeric if) is for backward compatibility and is no longer required or needed (unless you’re still using an old version of Lookout).
10-27-2005 12:57 PM
ICI, I read thru the replies, and I'm not sure you got the answer you are looking for.
Using a radio button WILL write an interger value to your N register (it does not write to the bit level, well, in a way it does, but it is designed to write an interger. So you could say that only the first 2 bits in your N register would change, they would be 00 for interger value=0, 01 for interger value=1 and 10 for interger value=2, so to check if you are in Radio Button Value=0 check both bits to be a zero state. Then you would have to check the other bits to see which position your Radio Button is in.
Ok, forget all that, and let's make it simple. Your N register will be an interger value of 0, 1, or 2, depending on which radio button is selected (assuming you have a 3 position radio button 'H-O-A')
An easy way around your whole problem is to make some logic in your PLC that says "if this N register is =0 then turn on bit1, next rung if this N register is=1 turn on bit2, next rung, if this N register is =2 turn on bit3. Now you have new 3 bits that turn on depending if you are in Hand, Off, or Auto (basicly just use an equal statement to turn on a bit's 'coil') Use these 3 new bits in your logic to make what you want to happen.
Hope this Helps
Rich Anderson
Green Bay, WI
10-27-2005 01:47 PM
Thanks Rich,
This what I ended up doing, the other suggestions didn't really work. I couldn't make their expressions work through a client/server setup. I tried using a radio button which was read by an expression, then linked the expression to a pot then linked the pot to the point in the PLC. The radio button always was writing to the PLC point and if another access point to the PLC tried to write to that point, then the radio button would overwrite it, not to mention that I couldn't get feedback from the PLC to display that point being on. So I put the logic in the PLC and used a pushbutton in Lookout to toggle a "move" command to put a value into that N register, just like you suggected. This was more simple and the controls are not relying on Lookout (if something happened to it)