LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

physical boolean transferred to mechanical boolean that latches

Solved!
Go to solution

(1) Does LabView have a three-way switch option (high, disengaged, low), or can it be cleverly engineered?

 

 An example for a special threeway switch on the front panel can be found here. However, you are not looking for a FP switch, but some boolean gynastics in code, dealing with multiple inputs. That shoud be even easier.

 

(2) Is it possible to have multiple text indicators transmit to the same location on the front panel depending on the case?

 

 An "indicator" is a data sink (not a data source) and does no "transmit" anything. Presumably, your data is in a wire and you can easily select which data to display using a "select" node (or a case structure if you need more than two selections).

 

(3) Should I just change my string byte to a boolean and place it somewhere in the feedback loop? (if case 'CC' then True, connect to the Build Array maybe?)

 

I don't know why you want to build an array, but may I don't understand your vague description. Where is "somewhere"? What is a "feedback loop" in this context? What have you tried so far? I would recommend that you write a small VI simulating your inputs. You can post it here and we can also try to come up with ideas. 🙂

 

0 Kudos
Message 11 of 15
(941 Views)

(1)  The hyperlink doesn't work for me.  I can't find anything in the LabView help or the Knowledge Base when searching for FP switch.  I'll search deeper, but another try at the link would be greatly appreciated.

 

(2)  I'll rephrase.  I want to send text messages to the user based on 10 possibilities, so 10 messages.  I want them all delivered to the same place on the front panel.  How can I achieve this please?  Meanwhile, I will search the link proposed by the other helper.

 

(3)  I don't really know HOW to do what I want to do.  I lifted the Build Array idea from your code.  Attached is my attempt at boolean gymnastics.  It's as elegant as a toddler learning how to somersault.  I am stuck in two places. 

 

(3a)  The way I wired this, the LED indicating the gain status of the x and y channels doesn't turn off once activated.  I would like them to do so, and I would additionally like them to be exclusive of each other - if one light is on, it prevents the others from activation / actively turns them off.

 

(3b)  At the beginning, in the Match String True/False command, this simulates an actual event (CC indicates LO/LO gain - see attached - and 00 indicates GPS Acquisition) although it does not account for all of the possible events.  There is a message byte for each combination of x/y gain setting, and a few other GPS indicators.  I would like to accomodate for these additional message bytes, perhaps in a Case statement surrounding the Match String T/F?  Perhaps as additional entries in the Build Array?  Perhaps using the feedback "node" properly?  I can't figure out a way to make the GPS Acquisition force Boolean False to the Front Panel LED lights.  All I have done is indicate that the Acquisition is underway.

 

I'm still working on this, but thought this would eliminate some of the vagaries.  Thanks for your help!

 

0 Kudos
Message 12 of 15
(927 Views)

CodeMunkee wrote:

(1)  The hyperlink doesn't work for me.  I can't find anything in the LabView help or the Knowledge Base when searching for FP switch.  I'll search deeper, but another try at the link would be greatly appreciated.


Here is the link. I am not sure what happened earlier. 😉

 

FP switch means a virtual switch on the Front Panel of the VI. Sorry for the confusion. 😉

0 Kudos
Message 13 of 15
(915 Views)

If you want the indicators to update in bit states, they need to go outside the case structure. ALso, you should not share case 0 with the default case, else it triggers no matter what the byte is. Make e.g. a "-1, default" case that does nothing.

 

I really still don't quite understand what you are trying to do. Maybe the attached modification can give you some new ideas.

 

 

0 Kudos
Message 14 of 15
(911 Views)

Thanks for the tip on pulling the lights out of the Case structure, your vi is helpful. 

 

Okay, let me back out of LabView and give you the overview that led me here.  I'll try to be concise...

 

Among many things, my instrument measures the electrical fields in the Earth; cardinal coordinates that correspond to x and y.  This instrument has an internal clock that has a known drift, so instead of the time issue being left for post-processing, it uses its gps to timestamp the data file every 512 seconds.  The instrument architect decided that he wanted to save memory, so he used one byte to share the GPS STATUS and the GAIN STATUS.  So the instrument streams to me the current GAIN STATUS (HI for high resolution with no background noise, LO when we have too much noise).  This gain byte has 4 combinations it sends me in Hex Code to indicate the current status of the gain (CC- all low, C8- all high, D8- x hi, D9- y hi).  Under normal operations, every 512 seconds, the GPS activates, dominates the shared byte, and connects to the satellites.  This stops the flow of the GAIN STATUS and turns the byte into the GPS STATUS, and it has a few things it can tell me as well (00- GPS actively locking- usually at the start of a run, C7- actively locking, but locked before - mid-run, D3- refreshing the almanac).  After a spell, it then locks, time-stamps the data file, then goes to sleep for another 512 seconds, and now the shared byte turns back into the GAIN STATUS byte, and sends me a CC, C8, D8, or D9 to indicate the current status of the gain channels.  It *should* always be the same gain status that was previously indicated (defaults to CC- all low).

 

 I am rebuilding the user interface using LabView in an attempt to leave the archaic Forth code and extinct HP200s in the recycling bin.  I cannot change the behavior of the GPS/Gain byte, but I thought with a little ingenuity I could make things a little simpler for our field technicians.  What I want is to have my gps/gain byte (it's isolated already by SubString) sent to some command/function (case?) that reads the byte for the 7 conditions listed above (00,C7,D3,CC,C8,D8,D9).  I would like LabView to indicate to the Front Panel what is happening.  If it is in GPS mode, I would like either a text message or an LED light to switch on that indicates to the user which of the 3 gps states the instrument is in (and that the gain status is unknown).  Once it switches to GAIN mode, I would like the Front Panel to indicate what the current gain is (according to the instrument) and allow the user to toggle to whichever gain is desired.  As an important aside to logical construction, I may only switch to D8 or D9 (only one channel in high gain) from a state of CC (both channels in low gain).  After 512 seconds, when the gps switches on again, I would like the Front Panel to indicate to the user that the status of the gains are unknown because the gps is in one of its three states (00,C7,D3).  And then repeat.

 

If you have made it this far, thank you.  I am very new to LabView and the learning curve is steep.  This forum has been a godsend for figuring out what options are available since I'm just shooting in the dark, but I think asking the experts to write my code for me is an absolute abuse of this forum, so if I was vague before it was because I was trying to figure out my problems piecemeal.  Perhaps having this overview is much more helpful for you to help me.  I'll be happy to share any more information you are interested in.

 

Can you point me in the right direction?

0 Kudos
Message 15 of 15
(907 Views)