LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble with simple test setting using case structure and boolean (new to labview)

Hi, I have all of my hardware set up (DAQ, thermocouples in place, etc) and I am trying to run an experiment where I run current through circuit breakers for an hour on and an hour off continuously for lets say 8 total hours of testing. I want to take temperature readings every 2 minutes only when the current is running for that hour(30 samples/hr). Do I use case structures or booleans to contruct the VI? What is the set up for this?

 

Thanks in advance!!

Labview Rookie

0 Kudos
Message 1 of 8
(3,040 Views)

Yes and Yes.

 

Have you taken the tutorials yet?

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

 

That is the best place to start.  Until you are able to start programming something, I doubt we can help you.

 

Message 2 of 8
(3,024 Views)

Below is my code attempt. I have included a for loop and a wait until next ms multiple for the experiment. I am aware it is wrong and had went through the tutorials and am still struggling. Can one guide me in the right direction?

 

Thanks!!

0 Kudos
Message 3 of 8
(3,010 Views)

I am sort of thinking out loud here for how to do this, so some thoughts may seem random...

 

Your loop should be a While loop, not a FOR loop.

 

Use a shift register to hold the state of the current.  How are you controlling the supply current?

 

Use the Elapsed Time with the target time set for 1 hour (3600 seconds).  When the Time Elapsed goes TRUE, invert your "applied curent" state.

 

Use a case structure.  When False, do nothing.  When TRUE, read your data and do whatever you want to do with it.

 

Likely need another shift register to tell how many hours you have ran (count Time Elapsed going TRUE).  When your 8 hour are up (or however long you want to run), stop your loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 8
(2,999 Views)

Thanks for the input- I am controlling the current with a PLC. This is what I have so far. All I want to do is obtain the data and then export it to excel - not sure how to do that. Am I missing anything because it is not running.

 

Thanks!

0 Kudos
Message 5 of 8
(2,990 Views)

Your code is inside out.

 

The while loop shold be the outside.

The case structure inside.

 

Elapsed time should be wired to the case selector.

 

0 Kudos
Message 6 of 8
(2,983 Views)

jetsfan,

 

Hope the attached file helps you in getting the task done...

 

-John

-John Theodore
Certified LabVIEW Architect, Certified TestStand Architect
0 Kudos
Message 7 of 8
(2,932 Views)

This is what I ussualy do to save data in excell. Os course, you need Excell installed in the PC.

 

Pantallazo 3.png

0 Kudos
Message 8 of 8
(2,909 Views)