LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why is the front panel locking during running the script

Ive created a labview script which reads and writes data o a file at user chosen intervals. When I run the script the script works fine when I change the script to read data and write it to file, however, once I stop it recording (but script still running), the front panel becomes locked and I can no longer press any of the user operation buttons E.G. the Start/Stop button or the take measurements button. Meaning I have to abort the script just to stop it, as well as it not being able o do its intended purpose.

 

Does anyone know why this is happening/ and how I might go about fixing it?

 

Patrick

0 Kudos
Message 1 of 6
(2,764 Views)

Hi pbointon,

                  Can you post your code?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 6
(2,759 Views)

The script is currently measure temperature through a thermo-couple, I plan on a different application at a later date but for now was trying to see how to excute this sort of application.

 

Cheers

Patrick

0 Kudos
Message 3 of 6
(2,754 Views)

Hi Patrick,

 

when you use LabVIEW you don't "write scripts", but you wire a block diagram! Please use usual LabVIEW terms so we all know what you are talking about...

 

You use an event structure without a timeout. So this structure will wait forever until you press the "On/Off"-button. Only then (and only once!) your VI will execute an iteration. You can watch this when using the Highlighting debugging mode...

 

Btw. you don't need an event structure for your VI. See attachment. It's also a good idea to use the cleanup tool from time to time, especially before posting code to the forum!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,743 Views)

Hi

 

sorry about that wrong wording amongst other things. Am very new to labview so apologies. I had a look at the one you tweaked and tried running it, the only issue im having is that its asking for a new filename on every loop when measurements are being recorded, but my aim is to store all the data collected for each recoding period in one file, and then have it prompt for a new name later on in the test when i start to take measurements again. The test could be running for 30 hours or so, hence ill be taking measurements every so often. How would i go about achieving this?

 

Patrick

0 Kudos
Message 5 of 6
(2,729 Views)

You need to put the file dialog in a case structure that only executes when you want to change the file name.  Store the file name in a shift register.  In the False case of the case structure, wire the file name through.

 

 

0 Kudos
Message 6 of 6
(2,722 Views)