LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 Almost identical structures: one is working and the other one is not.

Hello.

 

I really can't come up why one of two almost identical structures is working and the other one is not. These case-structures contain a part that generates signals for the DAQ outputs (the blue part (this part is the same for both structures)) and a part that collects data and draws a XY graph based on that (the red part). The difference between these 2 structures is as follows:

 

Structure one:

Contains only 1 input- DAQ Assistant that collects 4 signals: 2 control current signals (2-10V) and 2 pressure signals (2-10V)

 

Structure two:

Contains 2 input DAQ Assistans: a) A DAQ Assistant which collects 2 control current signals (2-10V), b) A DAQ Assistant that collects pulse count from a angular speed sensor (this is then converted to freaquency signal using "delay values").

 

The point is to combine the results of 2 measurement cycles in a signle graph. In the first 4000 iteration rounds the first graph is drawn and other outputs are forced to be 0. Then there is a 200 iteration round brake where all outputs are forced to be 0 and then at the iteration rounds 4200-8200 the second graph is drawn and other outputs are forced to be 0.

 

The problem is as follows:

 

Structure #1 works with no problems what so ever.

 

Structure #2 draws the second part of the graph correctly (iteration rounds 4200-8200) but doesn't draw the first part of the graph (iteration rounds 0-4000) at all.

 

I checked that all the data should be correct during the loop just before the "Build XY Graph" but for some reason it's not working properly.

 

Any ideas?

 

Edit. The picture of Case#2 seems to be old which is why the limits are different from Case#1, See "Case#2-UPDATED".

 

 

 

 

Download All
0 Kudos
Message 1 of 8
(2,839 Views)

I did some more research and apparantly if I just feed random numbers instead the measured signals everything works fine. What could cause this?

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

Are the two DAQ assistants talking to different devices or the same device?  Are you getting any error messages?  Do you have automatic error handling turned off?  Put error indicators on the DAQ assistants.  Are you getting data out of the DAQ assistants?

0 Kudos
Message 3 of 8
(2,699 Views)

I just located the problem! Apparantly if I remove the "Sample Compression" -blocks (mean, reduction factor 10) everything works again. What could cause this and any ideas how to overcome this since I'm pretty sure that I really need the filtering?

 

And the answers to your questions:

 

Yes, the two DAQ Assistans are talking to the same device (NI USB 6353). I do have automatic error handling on but I do not get any error messages.

0 Kudos
Message 4 of 8
(2,683 Views)

You aren't getting error -50103?  That is a common error when you have two different DAQ assistants talking to the same device.  One DAQ assistant will error out when the other DAQ assistant has the device reserved for the DAQ task.  If you are just doing single point data reading, you may be getting lucky that one is done by the time the other gets to it, but that is pure luck and will likely fail at some point in time.

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

No, I am not getting any error messages. However I'll have to convert the VI to an EXE in order to run it on the real system, does this turn off the automatic error handling?

 

Edit. Also could the fact that the other DAQ Assistant is reading analog inputs and the other one is reading digital inputs be the cause of not getting the problem?

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

I'm not sure what will happen when it becomes an .exe.  I think it will turn off the automatic error handling, but I may be wrong.

 

Analog vs. digital, that is why you aren't getting an error.  The error is actually caused by two different tasks sharing the same timing clock, which would happen if they were two different analog tasks.  Since one is digital, it isn't sharing the timing clock with thte analog task.

Message 7 of 8
(2,631 Views)

Thanks for you reply, that's what I thought. Anyway I would like to know why removing the "Sample Compression" blocks removed the problem. Also just changing the "reduction factor" of the blocks to 5 does the trick. I have no idea why but now it's working... 

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