From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set up an indicator to display for only 1 second?

I think you can do this if you set the VISA timeout so the serial read will error if it doesn't receive data after a certain time.  Just make sure you handle this error.  Basically, the serial read will error-out, say every 100ms, so the exit button can be evaluated.

0 Kudos
Message 11 of 14
(361 Views)

@Japper wrote:

I have cleaned this up a bit 


You have still way too much duplicate code. I would use a string array with the key characters, the use "search array" to process further. Maybe the attached draft can give you some ideas.

(I did not fix your wait issue).

Message 12 of 14
(351 Views)

@altenbach wrote:


@altenbach wrote:

You have still way too much duplicate code. I would use a string array with the key characters, the use "search array" to process further. Maybe the attached draft can give you some ideas.


 

Thanks Altenbach-

 

It does seem to be a more direct way of doing it but very messy when I add all 62 buttons:

 

cpanel_vi.JPG

0 Kudos
Message 13 of 14
(333 Views)

Put your bools in a cluster....then use array to cluster and set the size insert into the for loop, making sure your reorder of the bools matches your assigned array element indexes...and then you can hide the cluster border by making it transparent

 

Spoiler
testbuttonMOD[1].png

 

0 Kudos
Message 14 of 14
(327 Views)