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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and writing Digital Line

Hi there,
 
I,m trying to read and write a Digital Line with the use of LabVIEW Real-Time 8.2.1 and a PCI-6023E DAQ card.
The purpose is to connect a frequencygenerator to the digital line in and connect a counter to the DIgital line out.
 
When I run the VI it works fine and the frequency of the generator and counter is equal. The only thing is if I stop the VI. The 2 ports seem to keep connected, because the counter keeps on registrating the pulses from the generator.
 
Is this normal, or am I missing something or doing something wrong?
 
Best Regards,
Jens Dassen
 
Ps. the used VI is attached
Download All
0 Kudos
Message 1 of 6
(2,894 Views)

Hi Jens,

I don't know why it keeps on counting. On what terminals do you connect the input and output? The software is ok.

Regards,

Bas van Dijke
AE, Netherlands

0 Kudos
Message 2 of 6
(2,864 Views)

Hi Bas,

The DIgital Input is wired to line P0.0, where pin 52 is the signal and pin 53 is the ground.

The Digital Output is wired to line P0.1, where pin 17 is the signal and pin 18 is the ground.

 

Best Regards,

Jens Dassen

0 Kudos
Message 3 of 6
(2,863 Views)
Maybe you have crosstalk on your signal. Do you see anything before the vi is started?
 
What do you want to do with this vi? What is the maximum frequentie of your generator (because you are using a 1MHz clock)?
 
Regards,
 
Bas
0 Kudos
Message 4 of 6
(2,854 Views)
Dear Bas,
 
I rechecked the generator and counter and it cleared out that they had the 'wrong'settings.
 
The generator is a 2 MHz one, so this shouldn't be a problem.
The generator didn't produce an output of 0 and 5 v, but something like -3 and 2V. So i changed this to 0 and 5V.
 
Then the trigger level of the counter was set too accurate, so I turned this down and now every tick of the generator is counted by the counter. The counter also stops when the VI stops.
 
The next problem was the datatransfer between the DI and DO. First this was set to U8 port format, but i changed this to Boolean 1 sample 1 line and now it works fine, but why? that's still a question to me.
 
So for now my problems are solved.
 
I would like to thank you for your help.
 
Best Regards,
Jens Dassen
 
0 Kudos
Message 5 of 6
(2,839 Views)
Hi Jens,
Good to hear that your system is working now.
 
The U8 datatype is to read/write more lines in one channel (read write one sample to one channel that contains more lines). You can find more information about the different functions in the help file.
 
regards,
 
Bas
0 Kudos
Message 6 of 6
(2,831 Views)