LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

100 microseconds pulse using PCI6533

Hi Everyone,
 
I need to generate a 100uS pulse using PCI6533 on each of its 3 ports.  After generating the first pulse on port A0 (DIOA0), then generate the second pulse on DIOA1 after a delay of 100ms, third on DIOA2 and subsequent pulses until DIOC7.  Basically, a pulse of 100us followed by a delay of 100ms then repeats again on each digital line of PCI6533's ports.
 
Could anyone point me to a link or sample code that I could utilize to generate these pulses?
 
Thanks very much,
 
Frank
 
0 Kudos
Message 1 of 37
(3,896 Views)
I think the best solution would be to create 3 digital waveforms, each one with a pulse set up like you described.  Assign each waveform to its respective port, then do a Daqmx start to trigger them all to begin at the same time.  Take a look at the various functions on the digital waveform palette and experiment with them.
0 Kudos
Message 2 of 37
(3,883 Views)

Thanks Ravens Fan,

Do you happen to have a simple code to start with and then I could expand from that.  Thanks again,

Frank

 

0 Kudos
Message 3 of 37
(3,876 Views)

Hi Frank,

I believe that the example programs illustrating digital generation would be of help to you. These programs can be found in the following location. In LabVIEW select help>>find examples>> Hardware Input and Output>> Modular Instruments>> NI-HSDIO>>Dynamic Generation. More Information on Digital Generation can also be found in the HSDIO help file. Which can be found by clicking Start>>All Programs>>National Instruments>>NI-HSDIO>>Documentation>>NI-Digital Waveform Generator-Analyzer Help. Please take a look at these examples and post back if you have any more questions.

JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 4 of 37
(3,853 Views)
I'm sorry Frank, I haven't done any real work with digital waveforms, so I don't have any sample code.  Hopefully, JaceD's links will help get you on the right track.  Good luck!
0 Kudos
Message 5 of 37
(3,848 Views)
No problem Ravens Fan . . .your previous input is appreciated.  Thanks,
 
Frank
 
0 Kudos
Message 6 of 37
(3,835 Views)
Thanks jaced,
 
I have modified one of the NI samples (Write Dig Port) and now I can create a 100us pulse on each line of each port independently (one at the time).  However, I have run this code 1000 times to verify repeatabilty and accuracy (using a for loop) and I found that the pulse width varies from 100us up to 175us.  Is there a better way to make sure that this timing is more accurate?  Please see attached code for more details.  Thanks,  Frank.
 
 
Download All
0 Kudos
Message 7 of 37
(3,831 Views)
My apologies on above reply . . . The previous attached vi is incorrect.  Here is the correct vi sample that matches above picture:
 
Download All
0 Kudos
Message 8 of 37
(3,828 Views)

The problem with this VI is that it is software timed, and in reality there is no timing functions in the code so it just executes however fast it can.  On a faster or slower PC, the execution rate would change.  The "wrong" VI in the previous post is probably more in line with what you want.  (I have no way of testing it.)

Create a waveform that has a dt of 100 usec.  The waveform data would be a single sample of true followed by 999 falses.  This should create a 100 ms second long waveform with a 100 usec pulse at the beginning.  (For other waveforms, shift the location of the True.)  Set the clock sample, write the waveform, then start.  So now you have the writing of a waveform and write it 10 times.

Message 9 of 37
(3,818 Views)

Ravens Fan,

I have tried different changes, but not able to get good results.  Would you mind to modify above vi per your comments and I will do the test and advise results.  Thanks,

Frank

 

0 Kudos
Message 10 of 37
(3,813 Views)