04-30-2009 05:20 PM
OK I'm tempted to post this on the Rube Goldberg thread
Yes they have to be round- and they have to be in that order. There's gotta be an easier way! Frankly this is the nastiest code i've written in years.
Solved! Go to Solution.
04-30-2009 05:50 PM
04-30-2009 07:45 PM
The end goal is to provide the user with a "good" indication.
Each of the "Blobs" represents a sensor. The sensors are polled and a byte is generated as to indicate the output value ( the bytes overlap on an insane combination and mutiple adjacent sensors can be on). I need to display to the user, who is manually positioning the actuator, <enum> digital output good, encoded output good, and I can't tell (please move the actuator so I can tell or pres "fail"). so Faked bools don't solve the problem I need to have several colors to display on each "Blob"
Like I said - ( and smerc- I really like the thought you put in your posts) There's gotta be RG code in that working VI
04-30-2009 08:19 PM
I have to admit that I did not completely understand that explanation. You said that you're reading some sensors and you get a byte for the sensor value. I do not understand this statement: "the bytes overlap on an insane combination and mutiple adjacent sensors can be on". What do you mean the bytes overlap? Also, what is an "insane combination". Are you trying to simply provide visual feedback to the user as to whether an actuator is in the correct position? Are there 9 actuators?
In terms of visual feedback I would suggest just using a framed color box (in the Numeric palette). The value of the color box refers to the color you want. You would probably just need a very simple function to convert the sensor byte value to a color. Do the sensor values range from 0 to 255, or are there just specific values you get?
04-30-2009 08:51 PM
Sorry,
1 actuator, 9 sensors.
The actuator can actuate multiple, adjacent, sensors.
An error code is generated by a PIC(uP) if non-adjacent sensors are actuated. and a non-error byte <U8> for valid sensor activations
the GUI must indicate: Good/Bad sensor(s): Good/Bad decode and Indeterminate (please manualy position the actuator or press "fail")
I'm thinking 4 colors-
<enum>
Sensor good+Decode good(Pass- green):
Sensor Good+Decode bad(program fault-grey):
Sensor bad(decode indetermiate-red):
Decode bad+Sensors on(program fault-grey),
Decode Insane or too many actuators(Operator messing w/ me - yellow)
So- the question (simplified)
how can 9 interdepandant, round, front panel objects be set to 4 (or more) colors programatically?
Yes- the code provided will let me do it-but, its UGLY!
04-30-2009 11:01 PM
05-01-2009 03:18 AM
See altenbach's examples. Follow the links .
05-01-2009 09:04 AM
Thanks!
And thanks for the links- I could not have found that myself.