LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Automation

Solved!
Go to solution

Hi everyone, I have build a program which scans for temperature data and when certain conditions are met stops the scanning. The conditions are Max limit violation and other similar. But my vi is misbehaving. Even after the limits are violated or the other conditions are met the scanning is nit stopping. I have used Keysight DAQ970 for acquisition of the data. Please help me rectify my mistake. I have attached the vi for reference. 

0 Kudos
Message 1 of 9
(514 Views)

First, your code is overly complex for what it is accomplishing.  Recommend you move all the controls into arrays.  This would greatly simplify your code. 

 

The maximum temperature loop only runs once ever 25 minutes (90,000 second pause) and doesn't stop other threads from what I see. Can you explain how the code is should operate and stop scanning?

 

CAS_MattF_0-1737637741596.png

 

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 2 of 9
(487 Views)

why does you VI open with the menu bar way off screen? I can't even look at your block diagram because I can't get to the top of your panel to get to the menu to show block diagram.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 9
(462 Views)

That's actually 90,000 ms, or 90 seconds.

Message 4 of 9
(452 Views)

Consider using the attached code snippet to reduce the complexity of your software.

 

CAS_MattF_0-1737680847639.png

 

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
Message 5 of 9
(409 Views)

That's 90000ms or 90 secs. The max temperature check loop runs every 90 sec but the scan stop check loop runs every 65 sec. Also the channel writer is set at size unbounded. Probably I should change the size limit to 1 and the also make loop timing equal. Please think about this probable solution once.

0 Kudos
Message 6 of 9
(397 Views)

I cant open the attached vi due to a version mismatch of labview.. Can you provide some clarity on what is this and how will this be useful?

 

0 Kudos
Message 7 of 9
(392 Views)

This code replaces independent create channel controls. The code is larger and harder than it needs to be to accomplish the task.

 

CAS_MattF_0-1737721899326.png

CAS_MattF_2-1737722069079.png

 

 

Replaces

CAS_MattF_1-1737722018003.png

 

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 8 of 9
(357 Views)
Solution
Accepted by topic author KalKetu

The software should technically stop eventually. The issue is you code is unresponsive due to the way it is structured.  You need a higher loop rate for stop checking than acquisition.  See attached example.

 

I would recommend that you consider taking the LabVIEW Core 1 & 2 classes.  The code is currently not flexible and unmaintainable. With your purchase of a LabVIEW subscription, you get on-demand access to LabVIEW Core 1, which you can use to learn the basics of how to develop applications in the LabVIEW programming environment. These classes will be beneficial in developing better software.

 

Code sample has been converted down to LV 2015.

 

CAS_MattF_0-1737723578122.png

 

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 9 of 9
(354 Views)