LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analog in digital in and digital out slow ?

Hi
 
6261 PC board used.
 
I have 5 analogue channels as input, 2 digital channels as input, one of which is a trigger for the analogue
sample read. The analogue samples are written to a labview measurement file (.lvm) all this
is fine and dandy and can read up to about 720 k samples/s.
 
But when I try to output the second digital input (the one that isn't a trigger), I do not get an output
that is related to the input (using an oscillioscope to view input and output). The input shows
about 5 pulses to the outputs one. Eventually I want to sample the second digital inputm and
delay it slightly before outputting it, but I want to be confident I will be getting the same number
of pulses out.
I even trimmed to vi down just have one dig in, going straight out, and it still didn't match the
number of pulses.
 
I am using DAQmx throughout, could that slow things down (using express DAQ) ?
 
any help appreciated,
sandra
0 Kudos
Message 1 of 11
(4,557 Views)

Using DAQmx functions instead of DAQmx express does decrease overheads and u can reach better performance.

Post your vi and we can suggest better

0 Kudos
Message 2 of 11
(4,546 Views)
Hi,

i'm not familiar with the 6261, but keep in mind that most card don't have a lot ports that are hardware timed. You should look this up. (look for digital waveform or something like that), If it's not a hardware timed port, you'r stuck with single value software timed reading.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 11
(4,542 Views)
As requested I have attached the vi, it is for 5 analogue inputs and just one digital input, which is then used
as an output. If you can suggest a better/quicker vi I would be grateful.
 
Also I am looking to delay the output on a sample basis, any suggestions for this would be
appreciated. I tried inserting a variable to write/read to force a delay, but it was to slow,
 
regards,
Sandra
0 Kudos
Message 4 of 11
(4,528 Views)

Hi Sandra,

Could you please confirm what card you have.

I do not believe that National Instruments sells a 6261 card.

Thanks

Emma Rogulska

NIUK & Ireland

0 Kudos
Message 5 of 11
(4,492 Views)

sorry that was a typo, it is a 6251.

I have  got a little further with the problem, and have a new vi, but it is on the PC in the lab, which isn't

networked, so I am going to go down there now and get a copy and I will post it,

sandra

0 Kudos
Message 6 of 11
(4,479 Views)
here is my latest vi, I am still having some problems.
I created this vi from the 'Gen Dig Pulse.vi' example, I have changed it to
generate the pulse according to ticks rather than frequency and I have
added the trigger.
The source of ticks is a digital pulse from an optical encoder that is sending
out 360 pulse per revolution of an engine crankshaft, the trigger is from the
same optical encoder, but it one pulse per revolution. I require the
output to be of the same frequency as the trigger and delayed by a
configurable number of ticks.
The output is ok for up to about 400 revs per minute, but after that the output
is intermittent and some pulses are lost.
If anyone can take a look at the vi and advise me on this I would be grateful.
 
I have tried leaving only the 'wait until done task' in the loop, but this gave
no output, I also tried adding an implicit 'timing' task, but this gave to many
outputs,
 
regards,
Sandra
0 Kudos
Message 7 of 11
(4,476 Views)

Hi Sandra,

Rather than adapting "Gen Dig Pulse.vi", I would suggest using the example VI "Gen Dig Pulse-Retriggerable.vi".

This example is within the LabVIEW "Example Finder" library.

The navigation to find this example code is: click "Help" on the LabVIEW toolbar, select "Find Examples" from the drop down list, this will open the Example library.

Open the following folders to browse to the example code; Hardware Input and Output> DAQmx> Generating Digital Pulses. "Gen Dig Pulse-Retriggerable" is located with in the list of examples.

This VI should have the exact functionality you are looking for by setting the trigger source as the single trigger per revolution of the encoder and the delay in terms of number of ticks off the encoder.

I hope this helps you,

Emma Rogulska

NIUK & Ireland

0 Kudos
Message 8 of 11
(4,446 Views)

Many thanks EmmaR that vi certainly helped,

 

best regards,

Sandra

0 Kudos
Message 9 of 11
(4,427 Views)
My problem now is that I require the 'initial delay' set in the channel start to be the permenant
delay, any clues how to do this ? I have tried selecting property 'start:more:delay units' in the
trigger node, but I get an error 'not supported or not applicable', I have also tried adding
an implicit timing node and tried changing a similar property but got the same error.
 
Putting a loop around the whole thing does the trick, but this means some pulses are
lost at higher speeds.
 
regards,
Sandra
0 Kudos
Message 10 of 11
(4,427 Views)