LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to read 5th channel using cDAQ 9178 with NI 9219 modules

Dear RavensFan,

 

I've already adapted the event structures, I guess my thinking previous was wrong, but now I understand it properly how a state machine should work.

If you have the time, do you want to check if my program is better now?

 

I've attached it.

 

With kind regards,

 

Peter

0 Kudos
Message 11 of 22
(2,011 Views)

That's looking better.  Hopefully you'll see it working better when you get the chance.

 

In the zero state, you can get rid of that event structure.  In the worst case, you'll lock up your front panel for the same reasons I said earlier.  In the best case, it is redundant.  That case won't execute until you hit the Zero Channels button when the Zero Channels:Value Change event in the Wait for Events case calls it.  When you get to that state, it should run right away because of hte event structure inside of it was also waiting for the Zero Channels:Value Change event which has already happened.

 

Get rid of the event structure in teh Zero state, and you'll find it works the same.   And you won't have the risk of something locking up in the situation events aren't queuing up just right.

0 Kudos
Message 12 of 22
(2,001 Views)

Thank you for your reply.

 

I've noticed that event structure right before you answered me, I've already taking care of it 😉 But thanks anyway.

 

Is there something in my secondary (acquiring) loop that I can get rid of, or move somewhere else? Because when I use a dummy daq now, it gives me the error that my application can't keep up with the hardware, even when I'm using only 1 channel. The chart shows up just fine, but in the arrays connected to it, you'll see that there is sometimes no value given.

 

With kind regards,

 

Peter

0 Kudos
Message 13 of 22
(1,997 Views)

Dear,

 

This was my previous program, if u connect 1 dummy channel, you'll see that this acquires data much smoother.... Do you have any idea what the problem could be?

 

I've added meetapplicatie v2.4 (this goes smooth)

and meetapplicatie v2.51 (with the adapted states; this goes less smooth...)

 

With kind regards,

 

Peter

 

 

Download All
0 Kudos
Message 14 of 22
(1,976 Views)

Hi Peter, could you explain what you mean by smooth or less smooth? I cannot run your application since I am missing some of your subVI's. 

0 Kudos
Message 15 of 22
(1,881 Views)

Dear JosD,

 

My projectfile is added a few posts ago, is this enough together with my main.vi to be able to run my program? 

 

By less smoother I mean; when I start the acquiring, the data on the chart shows fluently, but there is also an array connected to the data output, and this gives a few times a second no data, when I try to record this data, it's says NaN... In version v2.4 of my main, this problem doesn't occure...

 

With kind regards, 

 

Peter

0 Kudos
Message 16 of 22
(1,863 Views)

Hi Peter,

a .lvproj file organizes the files you use for an application, but it does this with references. You need to send the subVI's you are using, if they are not native LabVIEW functions. On the attached printscreen you will see some questionmarks, indicating those subVI's are missing.

So the arrays are not updated properly? Do you mean the 'Filtered LVDT1/2' and 'Filtered PC' ones as on the pintscreen? At the same time, the charts are updating properly?

 

Arrays.PNG

 

0 Kudos
Message 17 of 22
(1,857 Views)

Dear JosD,

 

Oh, i'm sorry, I will attach those subvi's in this post.

 

Indeed, the Filtered LVDT1 and 2 and the Filtered PC, but also the graph connected to the data output is doing some strange things... You could see for yourself if you use a dummy DAQ and configure 1 channel. In my main v2.4 I don't have this problem, however, I haven't changed a lot...

 

With kind regards,

 

Peter

Download All
0 Kudos
Message 18 of 22
(1,834 Views)

There is another subvi, but I couldn't add it in my previous post.

 

Also I've noticed that my computer does need to do a lot more effort to run the v2.52 than the v2.4 😕

 

With kind regards,

 

Peter

0 Kudos
Message 19 of 22
(1,826 Views)

Thanks for the files. You mentioned v2.52, I don't see it yet? And please also send the .ctl for the states, that should be the last missing file. Zipping a complete project solves these kind of things, you can just create a build spec for that in the project itself.

0 Kudos
Message 20 of 22
(1,778 Views)