LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

highlight execution crashes vi

I  have a project coded up. I have a USB-6008 DAQ on a bread board with an LM34 temperture sense IC wired to an analog input of the DAQ. In front of the LM34 on the breadboard I have an LED sized filiment lamp, the lamp heats up the LM34. The lamp is 12V DC and is turned OFF/ON via a solid state relay connected to a digital output of the DAQ. I convert the degree F to degree C with a formula node on the BD, and then display both on Temperture ICONS on the FP. I also display the degree F on a waveform chart on the FP. I have an over temp setting ( temp > overtemp?) where i turn on both a virtual LED on the FP and a real LED on the breadboard. When ever there is an over temp condition I turn off the lamp and  write the temperture to a measurment file.


All this works very well UNTIL I turn on the Highlight trace debug tool, then the VI crashes after one itteration, what the heck?


*Please note I am modifing the VI attached to replace the express compare functions with simple compare functions, this eliminates the coersion dots on the compare. Also I am replacing the express formula to convert F to C with a simple Formula functin.

 

This is a learning VI I dreamed up and breadboarded it is LabView 8.6. Attached are the VI and a screen of the VI running.

 

Alan

Download All
0 Kudos
Message 1 of 7
(3,403 Views)

ajmartin wrote:
[...]All this works very well UNTIL I turn on the Highlight trace debug tool, then the VI crashes after one itteration, what the heck?[...]

Alan,

 

i don't think that the VI crashes. I assume that you get an error from your dataacquisition. This is natural if you have a continuous dataacquisition.

 

Continuous dataacquisition will result in a constant stream of data written into your memory (a buffer). This buffer is normally sized to keep about 1s. If you don't retrieve the data from the buffer using DAQmx Read, this buffer will overflow resulting into an error......

 

In your settings, you acquire data with 5kHz which leads to 5000 samples/s of data per channel. Since you configured the assistant to retrieve only 1000 samples per iteration, you have to loop at least five times per second! This is not given anymore if highlight is activated! 

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(3,384 Views)

Yes, as Norbert asks, does LabVIEW actually crash?  Or are you getting an error message?  If so, what error code are you getting?

 

One problem I see in your VI (other than lots of Express VI's that can be done with simpler LabVIEW functions), is that you have numerous indicators all coming from the same datasource.  You have temperature indicators and also indicators that are labelled as if they are reading a DC voltage.  But all feed from the same orange wire which would be the first piece of data that comes out of your DAQ assistant.  The second channel is never used, and for the first channel that is used, you are only actually using the first data point out of a thousand.

0 Kudos
Message 3 of 7
(3,356 Views)

Thanks for the reply. I did mention in my first post that I was in the process of getting rid of the express VI's, but the VI I attached was the one I had that was actuall in a running condition. Shoot, the DC indication should read AC it is an analog signal from the LM34, 1mv per degree F and it is linear. I multiply it x 10 to get it to volts instead of mv. I do see that I picked the mv off AFTER I scaled it up to Volts. Once I started looking into what Norbert replied I noticed that i had forgotten to remove the second analog input. I had a potentiometer connected at one point as a second analog in, that I could vary via the pot. I took that out. (it was an experiment) (as is this!).  After reading Norberts reply I changed the Acquisition Mode to "N-Samples" and every thing works fine.

 

I don't understand your comment about the one analog port I am using. I am reading in an analog signal that varies by 1 Mv per degree F , is there some other way i should do this? Besides NOT using DaqAssist? Hey, Thanks for your comment, Im going to go finish up cleaning the BD up.

 

Alan

0 Kudos
Message 4 of 7
(3,349 Views)

ajmartin wrote:

 

 

I don't understand your comment about the one analog port I am using. I am reading in an analog signal that varies by 1 Mv per degree F , is there some other way i should do this? Besides NOT using DaqAssist? Hey, Thanks for your comment, Im going to go finish up cleaning the BD up.

 

Alan


No.  It was about that fact your VI showed you using 2 analog inputs in that DAQ assistant.  The conversion from a blue datatype wire to a scalar orange wire meant you were only using the first data point off the first channel yet wiring that to different indicators were some were labelled for temperature and others for voltage.

 

Now you say you fixed your DAQ assistant to be only a single channel.  That Express conversion going on there is still converting an array of 1000 readings (embedded in the blue datatype) to a scalar.  There is really no logical reason to even read a temperature at 1000 times a second unless you are working with all the data to do things like averaging it together to help eliminate noise.  Temperatures just don't change that fast in any normal application to have that high of a data rate.

 

I had missed the part in the first message that you were in the process of eliminating the Express VI's.  The DAQ Assistant is not a bad Express VI.  I'll use it if I am trying to get a data acquisition up and running quickly.  But you still want to pay attention to your data rates and number of samples so that they make sense for the type of signal you are measuring.

Message Edited by Ravens Fan on 09-08-2009 02:23 PM
0 Kudos
Message 5 of 7
(3,338 Views)

Well it has been a fun afternoon. Take a look at my cleaned up BD and FP screen shot. I added the ability to change the Over temp " on the fly". I still have a coersion dot on the  "write to measurment file "  , function.  I know the problems with this, creates a buffer, slows things down, takes up memory.

I am currently studying for the CLAD is the coersion in this example something that really should be corrected? Im going to fix it just to prove I can, but just wondering......

 

Thanks again,

 

Alan

Download All
0 Kudos
Message 6 of 7
(3,332 Views)

Here is the VI with all the extra  express VI's removed.  High Light ececution works fine now also.

 

Thanks

 

Alan

0 Kudos
Message 7 of 7
(3,313 Views)