LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visualizing 16 bit digital data on one DI line?

Solved!
Go to solution

It took a little while to spot it, but the good news is that it's a really simple issue with dataflow.

 

In the DO/DI code, the call to DAQmx Write (with autostart set True) for the DO task can't run until *after* DAQmx Read completes (with the error you showed).   Note that in the AO/AI code, you split off the error wire so that they are allowed to run in parallel.  That's the difference.

 

(You've got other aspects of hardware sync set up ok b/c the DI task is triggered by the start of the DO task and the DI task is started first.)

 

 

-Kevin P

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 31 of 36
(607 Views)

Hi Kevin P,

In that case it should not work even for one channel. Trying to find the error I tried the same set up for

(1) Reading/writing one DIO- its working fine.

(2) Reading/writing two AIOs- its working fine. (I changed the sampling rate/number of samples etc accordingly; but signal flow is same; error wires too.)

(3) Reading/writing two DIOs-its not working.

I have attached those 3 VIs. I keep getting this error 200284. I tried using the methods they have suggested to avoid the error too. I am wondering can't I write multiple DIOs simultaneously for my PXIe-6366. And I am using port 0 itself, no PFI lines so far. 

0 Kudos
Message 32 of 36
(600 Views)

Hi GerdW,

I have been trying to write 2 digital waveforms on two digital output line. I have read at so many places that only one task is enough but in my attempt I have been failing continuously. Only if I remove one signal and write on one channel it is working. But I need to write multiple waveforms on multiple digital output lines. I have attached the snapshot of the vi and the error that keeps popping. Please suggest how can I write more than one digital waveform simultaneously.

Download All
0 Kudos
Message 33 of 36
(585 Views)

One of the inputs to the initial "DAQmx Create Virtual Channel" function you call lets you choose between "1 channel for each line" and "1 channel for all lines".   The default when left unwired must be "1 channel for all lines" and then later you try to write 2 channels of data.  Hence an error (but it shouldn't still be the -200084 timeout error).

 

First try specifying "1 channel for each line" and see if that lets you write an array of digital waveforms (meaning multiple digital channels).

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 34 of 36
(574 Views)

Hi Kevin P,

Yes I realized this earlier today. It was a silly mistake from my part. Thanks anyway! Although the current problem that I am facing right now is I want to write PFI lines of PXIe-6366 alongwith normal DIO lines (port 0 lines). And it keep on showing me this error 'selected lines are not for buffered operation". Apparently I can't use PFI lines while using hardware timed clock. I was using ''onboard clock". I read somewhere that for writing on these lines I must use counter clock as source for DAQmx timing vi and not the onboard clock. I did but I am still getting the same buffered operation error. Would you please suggest me in this direction.

0 Kudos
Message 35 of 36
(567 Views)

As mentioned back in msg #28, no you cannot use port 1 or port 2 (where pins may share duty as "PFI lines") for any kind of hw-clocked DIO.  Doesn't matter whether you use "onboard clock" or a counter output, the board hardware simply doesn't support the capability.

 

You *can* make separate DIO tasks on port 1 or port 2 if they run in on-demand software timed mode (the mode you get when you don't call DAQmx Timing.vi to configure a hw clock).   But the signal timing won't have hardware-level precisions relative to a buffered and hw-clocked task on port 0.

 

You have a total of 8 lines on port 0 that can be programmed for hw-clocked DIO.  Note that the board will only support 1 hw-clocked DI task and 1 hw-clocked DO task at a time.   All DO lines that need hw-clocking need to be in one common task together.

 

You also have 16 more DIO lines on ports 1 and 2 that can be programmed for software-timed DIO if precision timing isn't so critical.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 36 of 36
(553 Views)