From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

digital waveform generation using NI6280 port0

I am trying to make use port 0 of my NI 6280 to generate digital waveform clocked using conter0 output. I need to generate 5 address bits to scan my pressure scanner,  00000  (port 0) to 11111(port 32) using conter 0 output as clock source. for each clock signal my outputs port 0 line 0:4 should change like 00000,00001,00010,00011....11111 and repeat this sequence till my clock source gives output. I have generated a counter task which generates 10khz output pulses on PFI12, and i want to give this PFI12 as clock source for my digital waveform generation on port 0. when i try to make a logic using digital output task, with timing source as counter 0 output, pfi 12, code gives an error saying port 0 is not free. subsequently i tried to use port 1, there i am getting an error , buffered operation is not supported. what might be the issue? how generate pulses clocked using counter 0 out as clock? 

0 Kudos
Message 1 of 8
(2,547 Views)

Can you post your code?  What you describe sounds basically correct -- generate a pulse train with a counter, then use it as the sample clock for a port 0 DO task.   You're probably really close.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 8
(2,536 Views)

Kevin,

Please find attached my code and error. With this code I am able to generate Counter pulses and using this as clock i am able to acquire my AI channels also. But DO output code is giving me error.

Download All
0 Kudos
Message 3 of 8
(2,508 Views)

I am using NI6280 M Series Data Acquisition card  and SCB68 as its terminal block.

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

I don't see anything in your code to explain the specific error you posted.  Does the error occur at the call to DAQmx Write?   Do you have any other programs running that might also be reserving digital lines from port 0 of your board?   Test panels in MAX maybe?   

 

That said, I see a few other things that don't look quite right in the code:

 

1.  Both AI and DO are set for Finite Samples timing mode, but you didn't wire a # samples into the DO task.   So it'll use the default value of 1000 instead of the 32*400=12800 you want.

 

2.  You only write 32 samples to the DO task.  If your board defaults to regeneration mode, this will be fine since you want to repeat those samples anyway.  I'm just not sure which boards have regeneration mode on by default, especially for finite output tasks.

 

3.  The sequencing of the tasks isn't right.  Because the counter is making a sample clock for the AI and DO tasks to use, it's crucial to make sure the counter task starts *last*.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 5 of 8
(2,496 Views)

Kevin,

Thank you very much for your help. Actually my MAX configuration was wrong, earlier I was using NI6280 to communicate and read from my SCXI chassis. And my MAX configuration was for this setting. After deleting this SCXI, now I am able to use PORT0 for digital output generation.

All other corrections as suggested by you, are done and my code is working now...

 

But now I have another issue, I would like to use my SCXI communication also. How will I be able to do this? I have some 20 more measurements which I was doing with SCXI. I need those acquisition also along with this Pressure Scanner reading.

I was using NI6280 to read this SCXI in multiplexed mode.

 

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

I've barely touched SCXI and that was more than 15 years ago, so I don't have any specific knowledge.  Here are a couple links I found when searching the combo of your error -200587 and SCXI, hopefully they help some:

 

Using the Digital I/O Lines on E or M Series DAQ Board While Controlling an SCXI Chassis

 

Having an SCXI Configured in MAX Causes Four Digital Lines to be Reserved

 

What Digital Lines are Reserved by SCXI when Connected in Parallel Mode?

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 7 of 8
(2,486 Views)

Kevin, 

Thank you..I will go through these documents...

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