Home / Troubleshooting & Faults

Feature Request - Value Equal ?

CommunityMartin AI Resolved
Started by GregL · 16y ago · 11 views · 3 replies
16y ago

To all,
Under the devices tree --
Control - Logic - custom...
There is a a value compare, which is a comparator.
How about a value equal?  Maybe used for when one has 'radio' type integer buttons and needs to enable specific blocks, dependent on selection?  And possibly make the equal to value part of the control and it's display?
Thanks,
Greg

16y ago

Make a copy of the control that you want to turn on when "equal".  Then go to the style tab of the control properties.  Select LED and in options change to "String", then type in the value you want to match.   It must be an EXACT match.  For example, 0dB in the string will work, but 0 or 0db or 0DB will not.
Now the LED will come on when the string matches.
You can also turn the a level control into a button, and turn on the string and enter an (exact match) value.  Now when you press the button, it will adjust the level to the string value and come "on".  As soon as the level is then changed and the value no longer matches, the button will turn off.
Is this doing what you need?
Scott

16y ago

Scott,
I need the signal at a wire or a logic level, not at a UI level.
Say I've got a set of 'radio' buttons (one integer control, value from 0 to 3, four copies, each loaded with 0,1,2,3 respectively)
I then need a 'wire' level boolean value for a match to each value of the radio buttons.
Within my blocks, I had four seperate read-only controls that matched each value.
I used two 'value compare' 'custom...' logic devices, with the inputs reversed, then 'anded' together so output was true only if both value were equal...
IOW, if A and B are the inputs to the two 'value compare' devices, they will *both* be high/true only if A and B are equal.
Does that make sense?
Greg

16y ago

Two ideas:
1. Python script.
2. Two value compare devices, one AND. Wire as follows:
A -> compare1 in 1
A -> compare2 in 2
B -> compare1 in 2
B -> compare2 in 1
AND both compare outputs.
This *might* scale up to n inputs; until you realize that suggestion #1 is probably the best way to do it.
Did I mention just use a Python script?

Log in to reply to this topic.