LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Much like a wall timer, how do I program labview to simply flip a switch at a certain time? Simple to you but HELP asap!

Decimal String to Number

 

String >> Number/String Conversion palette

0 Kudos
Message 11 of 14
(398 Views)

@RavensFan wrote:

Decimal String to Number

 

String >> Number/String Conversion palette


Duh!  Thanks.  If was a snake it would have bit me.

 

I also found that scan from string also works.  Not sure which one is more appropriate.

SCAN.PNG

Thanks again,

The Dude

 

0 Kudos
Message 12 of 14
(372 Views)

You can use either.

 

The Decimal String to Number is simpler and does one thing well.

 

Scan from String is a bit more complicated, but has a lot more flexibility allowing you to grab multiple values and specifically define the formats for each of them.

 

If the Decimal STring to Number does what you need, then use it.  If you need something more sophisticated, then use Scan from String.

0 Kudos
Message 13 of 14
(368 Views)

Here is my "Timer Loop" I use all the time for waiting between instrument scans if I have nothing else to do while waiting.

 

I use a lot of state machines so the Scan Time (brown cluster) is sent to a shift register. That way on the next wait state, the time of the last scan is used as the start time of the wait. This makes up for any delays that happen during other states so your timer is "real time".

 

Timer2.PNG 

 

Here is an example of a simmilar Timer used in a state machine with an Event Structure to handle the Stop button.

 

Timer.PNG

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 14 of 14
(361 Views)