LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ assistant is not recording data when case structure is false

Solved!
Go to solution

I am trying to turn on-off a heater using relay module at intermittent operation (certain time on and certain time off). The attached program do that quite well. Except that I also want to record temperature of the heater using DAQ assistant and it does not record any data when the case structure is false. I mean, when the relay module is turned off. I tried using the DAQ vi in the case structure. However, aparently it is not possible to call same analog input module twice in same program. Any solutions? Thanks in advance. Smiley Happy

0 Kudos
Message 1 of 30
(3,409 Views)

What are you using for your On and Off times?  I suspect you have a much longer wait for the Off time and it is that extra wait that is keeping your loop from iterating.

 

Instead of having set waits, you should have your loop iterate at a set rate and check to see if enough time has elapsed.  Toggle your relay state when the time has elapsed.


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 2 of 30
(3,377 Views)

Thank you so much for the reply. Would you mind to upload the .VI file?

0 Kudos
Message 3 of 30
(3,350 Views)

What I posted is called a snippet.  Save that png to your computer and then drag it onto your block diagram.  This one was made in LabVIEW 2014, so you will need 2014 or newer to use it.  Even then, you can see all of the code needed.  I used your Express VIs as they were already configured.


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 30
(3,344 Views)

It's a snippet.

 

Drag the image to your desktop, then drag that onto your block diagram.

0 Kudos
Message 5 of 30
(3,342 Views)

Thank you so much for the code. While the thermocouple module is continuously recording data, the ON time-Off time not seem to be working. Is there any specific way I have to configure the Elapsed time.vi? I'm using LabVIEW 2013.

 

Thanks.

0 Kudos
Message 6 of 30
(3,264 Views)

Your didn't change your code.  Show us what you currently have so that we can help you debug your current issue.


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 7 of 30
(3,258 Views)

Sorry. I uploaded the older version. Thanks.

0 Kudos
Message 8 of 30
(3,251 Views)

The code looks fine to me.  But do note that the Target Time input to the Elapsed Time is in seconds, not ms.


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 9 of 30
(3,236 Views)

In my experiment I need 15 min relay on time and next 15 min relay off time. When I run the code with some ontime-off time. Frist the relay remains on the specified tme and then starts on-off frequently. 😞

0 Kudos
Message 10 of 30
(3,230 Views)