09-15-2008 08:56 AM
Greetings,
I am using an NI PXI-6723 Analog Output board with an SCB-68 connection interface and I have 16 analog output signals going to an external computer. After looking at the examples, this is what I came up with to send out each signal, but I can't help but think that there's a more efficient way (i.e. maybe a single VI to handle the 16 AO blocks). I thought about creating a sub VI but there aren't any front panel controls for this.
Thoughts, ideas, help?
Thanks,
-- Michael
09-15-2008 10:03 AM
Nothing that you are doing is very efficient. Show below is how you can use a single DAQmx Create Channel and the Build Array function.
09-15-2008 11:34 AM
Dennis Knutson wrote:Nothing that you are doing is very efficient. Show below is how you can use a single DAQmx Create Channel and the Build Array function.
Ahhhhh, much better. Thanks!! Will this help with the responsivenes???
09-15-2008 03:14 PM
Well, I did this (see attachment) and now I get nothing. Although you can't see them, there are 16 lines going into the Build Array block. And separate from this, I have a question about system responsiveness.
I put a meter on my SCB-68 board (connected to the PXI-6723 that resides in the NI-1033 chassis) and with the previous incarnation, I didn't see changes register for about 6-9 seconds after moving the sliders in LV. This is NOT GOOD. I should see instantaneous changing of the voltage levels.
Can someone suggest troubleshooting points?
I'm running LabVIEW 8.5.1 under Windoze XP.
Thanks,
-- Michael
09-15-2008 03:20 PM
Before anyone mentions it, I know that the Analog Output Create Channel is showing only one channel (i.e. PXI1Slot2/ao8). It had PXI1Slot2/ao8:23 when I tested it. I forgot to put it back in for the screenshot!
Thanks,
-- Michael
09-15-2008 08:30 PM
09-16-2008 09:11 AM
Dennis Knutson wrote:
You've only got a single analog output in your physical channel control. You also should have a msec wait inside the while loop. Anything will do but it would not make sense to poll the front panel more than a few times per second. You also should not have a constant wired to the loop's termination terminal. The only way to stop your VI is with the abort button and that is a BAD thing.
I'm a little confused. Why is the msec timer needed? And are you talking about the Wait Timer or the Wait Until Next ms Timer? Also, I've never seen anything but a STOP button wired to the termination node of a while loop (with the exception of Status cluser OR'd with the input of a STOP button). If I wire a constant to it, the only thing to terminate it would be the regular ABORT EXECUTION button. Isn't that bad?
Thanks for your help!! I truly appreciate it.
-- Michael
09-16-2008 09:17 AM
Without a wait of some time, you are just hogging the cpu and the front panel will become unresponsive.
Yes, you should have Stop button. Your image showed a constant.
09-16-2008 09:41 AM
Dennis Knutson wrote:Without a wait of some time, you are just hogging the cpu and the front panel will become unresponsive.
Yes, you should have Stop button. Your image showed a constant.
Ahhhhh, I understand now. I changed that in a later revision. Sorry about that. I have one more question for you. I "figured out" (or surmised) that some of my unresponsiveness may have been due to my using older version of the DAQ modules. I recreated everything from scratch and things are FAR MORE RESPONSIVE than they were 🙂 I was wondering, however, if I needed to have 4 separate while loops. Right now, I have a loop for the Digital In's, Digital Out's, Analog In's, and Analog Out's. I think I originally did this because I assumed that was necessary. Is it? And the wait time only needs to be 100ms or so, right?
Thanks a million! Drinks all around 🙂
-- Michael
09-16-2008 10:34 AM