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.
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.
03-28-2010 02:04 AM
I am using Labview 8.2 with an AI Input card 9215 on CDaq 9172. The application uses a static task to read the voltage(displacement).
The app works fine, except when the app is closed(using the x in the top RH corner), then restarted I get the error -200428 at DAQmx Start Task.Vi(Value passed to the task/Channel is invalid). The only fix is to restart the PC.
I have checked that the Stop Task VI is called when the app closes. I have tried resetting the Daq device using Max but it makes no difference.
I believe there is some problem in my code closing the task properly, hence the need to restart the PC to release task resources.
Any suggestions ?
03-28-2010 06:55 AM
When you close the Panel, this VI is aborted, so the stop task vi isn't executed.
You should provide a 'stop' button and read this in the while loop to stop your application.
If you want to have the possibillity to close the app using the x on the Panel, you will need an event structure und register for the Pnael Close? Filter Event. Discard this Event! And signal the while loop that it should stop (you could write to the stop button via a local variable, although this is not an elegant solution).
Felix
03-28-2010 12:50 PM
Thanks, my simple VI did not show it but my app does include the panel close event in the UI loop. When this event fires a "Stop" message is added to the messaging queue. This message is then dequeued and the task is stopped
I have enclosed another simplified VI to show this
03-28-2010 12:57 PM
Can you post your actual VI rather than very poorly rendered, reduced sized screenshots of your code?
There are a lot of wires that appear to be missing in your screenshot such as the queue reference wire.
03-28-2010 01:22 PM
04-05-2010 01:37 AM
Enclosed a simple Vi that demonstrates the installed app. I have used a simulated CDaq device (identical to the customer cDaq)on my development PC and the simple VI works fine(both built as an exe and just running the VI on the development PC). The static task is identical to the task on the production app that is giving problems
<Item Name="VoltageIN" Type="NI-DAQmx Task">
<Property Name="\0\AI.Max" Type="Str">10</Property>
<Property Name="\0\AI.MeasType" Type="Str">Voltage</Property>
<Property Name="\0\AI.Min" Type="Str">-10</Property>
<Property Name="\0\AI.TermCfg" Type="Str">Differential</Property>
<Property Name="\0\AI.Voltage.Units" Type="Str">Volts</Property>
<Property Name="\0\ChanType" Type="Str">Analog Input</Property>
<Property Name="\0\Name" Type="Str">VoltageIN/Displacement</Property>
<Property Name="\0\PhysicalChanName" Type="Str">AnalogIN/ai0</Property>
<Property Name="\1\AI.Max" Type="Str">10</Property>
<Property Name="\1\AI.MeasType" Type="Str">Voltage</Property>
<Property Name="\1\AI.Min" Type="Str">-10</Property>
<Property Name="\1\AI.TermCfg" Type="Str">Differential</Property>
<Property Name="\1\AI.Voltage.Units" Type="Str">Volts</Property>
<Property Name="\1\ChanType" Type="Str">Analog Input</Property>
<Property Name="\1\Name" Type="Str">VoltageIN/Loadcell</Property>
<Property Name="\1\PhysicalChanName" Type="Str">AnalogIN/ai1</Property>
<Property Name="Channels" Type="Str">VoltageIN/Displacement, VoltageIN/Loadcell</Property>
<Property Name="Name" Type="Str">VoltageIN</Property>
<Property Name="SampClk.ActiveEdge" Type="Str">Rising</Property>
<Property Name="SampClk.Rate" Type="Str">20</Property>
<Property Name="SampClk.Src" Type="Str"></Property>
<Property Name="SampQuant.SampMode" Type="Str">Continuous Samples</Property>
<Property Name="SampQuant.SampPerChan" Type="Str">100</Property>
<Property Name="SampTimingType" Type="Str">Sample Clock</Property>
</Item>
However on the customer PC it throws the error -200428 even after a restart of the PC
Any ideas would be appreachiated
04-05-2010 01:42 AM
04-05-2010 01:57 AM