Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Access To Individual Analog Out Signals -- Is this efficient (see picture)?

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

 

Analog Output Section

0 Kudos
Message 1 of 17
(4,050 Views)

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.

 

0 Kudos
Message 2 of 17
(4,045 Views)

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??? 

0 Kudos
Message 3 of 17
(4,032 Views)

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

 

Analog Output Section (Part 2) 

 

0 Kudos
Message 4 of 17
(4,021 Views)

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

0 Kudos
Message 5 of 17
(4,020 Views)
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.
0 Kudos
Message 6 of 17
(4,000 Views)

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 

 

0 Kudos
Message 7 of 17
(3,981 Views)

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.

0 Kudos
Message 8 of 17
(3,978 Views)

 


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

0 Kudos
Message 9 of 17
(3,974 Views)
I'm not sure it will make a difference to have separate loops or not. One thing that would probably make a difference is the use of an event structure. In your analog out example, with a value change event for the numeric controls, the DAQmx Write would only be called when a control is actually changed - not with every iteration of the loop.
0 Kudos
Message 10 of 17
(3,968 Views)