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.
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.
09-15-2018 04:45 AM
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?
09-15-2018 06:03 AM
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
09-17-2018 12:09 AM
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.
09-17-2018 12:10 AM
I am using NI6280 M Series Data Acquisition card and SCB68 as its terminal block.
09-17-2018 06:09 PM
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
09-17-2018 11:54 PM
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.
09-18-2018 07:37 AM
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
09-20-2018 08:19 PM
Kevin,
Thank you..I will go through these documents...