
adccommunitymod (AutomationDirect) asked a question.
Created Date: June 04,2009
Created By: worknhard9062
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I'm using C-More v2.42 connected to DL06 PLC. The question is about the Radio Button control. Let's say I plunk a 4-button Radio Button control on my C-More panel layout. It's assigned to some numeric tag in the PLC. What is the default value for the control, that is its power on initial state? What I'm seeing is that the control is initialized with ALL buttons off (numeric output = 0). This behavior is a little funky and I'll argue that a Radio Button control by its nature should have one of it's buttons ON by default. A state of ALL off is outside normal expected behavior. If you press a button then the output from the control to the tag in the PLC becomes 1, 2, 4 or 8, depending on which button you press. You might respond and say whatever the PLC tag value is when the C-More talks to the PLC is what the control display will be initialized to. And that seems to be what happens, which is the only reason some of my radio buttons actually have an initial state that makes sense. However, lets say I assign the radio button to an INTERNAL C-More tag. Hmmmm... The INTERNAL tags (which are not really discussed in great detail in the Help file) evidently take a 0 as their initial state. There seems to be no way to preset an INTERNAL tag with a non-0 value. So my Radio Button, when assigned to an INTERNAL tag, displays as all off until the operator presses one of the buttons. So the answer to my question seems to be - the Radio Button control is initialized at C-More power on to 0 (all buttons off). The C-More logic then reads the tag data associated with the control and sets the control display accordingly. If the assigned tag also happens to contain a 0 (which INTERNAL tags will) then the buttons remain all off. Why am I even here? Because I'm using the value of the INTERNAL tag to conditionally control the visibility of other controls. Sort of a simple screen configuration function, lets the operator choose scaling of meter displays for transducer inputs into the PLC. The operator can choose from various engineering unit ranges for transducers, depending on the application. I could assign the Radio Button to a tag inside the PLC and use the PLC to preset the value to a valid number (not 0), but I hoped to avoid changing the PLC code just to avoid C-More idiosyncrasies. Any better ideas? Thanks in advance.
Created Date: June 04,2009
Created by: Do-more PE
See the other post about initializing internal tags.
Created Date: June 04,2009
Created by: worknhard9062
See the other post about initializing internal tags.
On Event SYS BIT ON = 1 Then MyTag = 1
Works great - thanks!
Created Date: June 04,2009
Created by: worknhard9062
I'm using C-More v2.42 connected to DL06 PLC. The question is about the Radio Button control. Let's say I plunk a 4-button Radio Button control on my C-More panel layout. It's assigned to some numeric tag in the PLC.
What is the default value for the control, that is its power on initial state?
What I'm seeing is that the control is initialized with ALL buttons off (numeric output = 0). This behavior is a little funky and I'll argue that a Radio Button control by its nature should have one of it's buttons ON by default. A state of ALL off is outside normal expected behavior. If you press a button then the output from the control to the tag in the PLC becomes 1, 2, 4 or 8, depending on which button you press. You might respond and say whatever the PLC tag value is when the C-More talks to the PLC is what the control display will be initialized to. And that seems to be what happens, which is the only reason some of my radio buttons actually have an initial state that makes sense.
However, lets say I assign the radio button to an INTERNAL C-More tag. Hmmmm... The INTERNAL tags (which are not really discussed in great detail in the Help file) evidently take a 0 as their initial state. There seems to be no way to preset an INTERNAL tag with a non-0 value. So my Radio Button, when assigned to an INTERNAL tag, displays as all off until the operator presses one of the buttons.
So the answer to my question seems to be - the Radio Button control is initialized at C-More power on to 0 (all buttons off). The C-More logic then reads the tag data associated with the control and sets the control display accordingly. If the assigned tag also happens to contain a 0 (which INTERNAL tags will) then the buttons remain all off.
Why am I even here? Because I'm using the value of the INTERNAL tag to conditionally control the visibility of other controls. Sort of a simple screen configuration function, lets the operator choose scaling of meter displays for transducer inputs into the PLC. The operator can choose from various engineering unit ranges for transducers, depending on the application.
I could assign the Radio Button to a tag inside the PLC and use the PLC to preset the value to a valid number (not 0), but I hoped to avoid changing the PLC code just to avoid C-More idiosyncrasies.
Any better ideas? Thanks in advance.