LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create pulse with 6542 card

Hey svt4cobra6,

 

Unfortunately you cannot use the Strobe input as a reference clock, only as an Acquisition clock. So I would recommend that you do wire up your 6 kHz clock into the Strobe input, and use that as your acquisition session clock source, if you are still acquiring your serial data with it. Now, one thing you can try is to also route your 6 kHz clock into a PFI line, as well as Strobe, and use that PFI line as a trigger for your 1 ms pulse that you need to generate. Since you will be oversampling on the generation side, you can adjust where you have the data come out in reference to that trigger, either by padding your data, or using the Data Delay feature of the 6542. You can either use it as a Start Trigger, or possibly a Script Trigger. I am not sure how often you will need to send out your 1 ms pulse, so you will have to adjust for this in your application. You will also want to keep in mind the "Delay from Trigger to digital data output" specification of the 6542 if you need really precise timing of when your pulse will be output compared to your clock rising or falling edge.

 

Can you remind everyone of your application's specifics, so that we know what you will be doing. In your other post, you mention the following: "I will be trying to read serial data from a digital signal processor from the mid 1990s and converting the bits into ascii characters." and "The DSP does provide a serial clock, chip enable and data line." And in this post you talk about generating a 1 ms pulse based on an external 6 kHz clock source. Can you tie everything together for us, like when this pulse needs to occur, what kind of timing do you need, etc. Maybe attaching timing diagram would help. Maybe give a high level overview, "When I get a serial pattern of 10111000, I want to generate a 1 ms pulse back to the DSP," or something like that, and then give some lower level details of what kind of timing you have to meet. This just helps with the back and forth questions/answers. Thanks, and let us know if you run into more questions/concerns.

 

Regards,
DJ L.

0 Kudos
Message 11 of 18
(1,210 Views)

Thanks for the additional information.  I have two seperate activities for the card, the first being just reading the serial data from a 90s DSP.  The second completely seperate activity is creating a 1 msec pulse at a specific time after the falling edge of an input clock signal of 6k hz.  I am still gathering details on the second activity but am thinking I may need to generate more than 1 pulse and the pulses will repeat with every input clock cycle.

0 Kudos
Message 12 of 18
(1,203 Views)

I was finally able to get some low level information, for now I am just trying to create 2 output pulses with the 6542 card so will use two seperate digital I/O lines for the pulses.  I have a 6k clock (feeding into the 6542) and at .5 microseconds from the rising edge of the clock I want to create a 1 microsecond pulse. At .7 microseconds from the rising edge of the clock I want to create a .25 microsecond pulse, all TTL level.   So for this setup should I run the clock into the strobe input and a trigger line?

Thanks

0 Kudos
Message 13 of 18
(1,183 Views)

Hey svt4cobra6,

 

I do think you should run your generation clock at the max rate, and run your 6 kHz clock signal into both your strobe and PFI line, so it can trigger your generation of your two pulses. Based on the Delay from Trigger to data out spec, you can determine how much to pad your data with 0's until you need to output 1's for your pulse. Since you are basing both pulses on the same edge, you will just need to set up a Start Trigger, and then have the data represent the timing of your signal. Then really all you need to determine, other than how many 0's and 1's to create your pulse with your clock rate, is when you actually want to start looking for that digital edge for the start trigger. This can most likely be handled in your program, as you can configure everything on the generation side, and not call niHSDIO Initiate until you are ready to start looking for that trigger. Hope this helps.

 

Regards,

DJ L.

0 Kudos
Message 14 of 18
(1,174 Views)

Hi, finally am able to start working on this again. I have the 6k hz signal connected to both the strobe and PFI 1 and have a labview program started, not much yet just takes the device name and uses both initialization VIs for generation and aquasition.  I am hoping that because labview runs in windows there will not be any timing issues generating the pulses since it is a non realtime operating system.  There is a bit of a learning curve and I am currently reviewing all of the associated built in VIs so will probably have some additional questions.

Thanks.

0 Kudos
Message 15 of 18
(1,149 Views)

Also probably more work to create a C program to do this.

0 Kudos
Message 16 of 18
(1,149 Views)

Just had a questions on the suggested example, Dynamic generation with External Sample Clock since I am trying to generate data based on an external clock.  I found 3 files in the folder, DynamicGenerationWithExternalSampleClock, a text file, a dsp file and a mak file.  Do you need visual studio or  a C compiler to run this code?  Also is there a VI example of this program?

Thanks Paul.

0 Kudos
Message 17 of 18
(1,095 Views)

Hey Paul,

 

If you are wanting to use LabVIEW, I would recommend that you use the NI Example Finder to find the example you are looking for. Go to Help -> Find Examples, and then when the Example Finder comes up, you can use the Browse by Task, and then go to Hardware Input and Output -> Modular Instruments -> NI-HSDIO (High-Speed Digital I/O) -> Dynamic Generation -> Non-Scripted, and you should be able to find the example you are looking for. Or you can go directly to the directory where the LV Examples are stored by going to C:\Program Files\National Instruments\LabVIEW xxxx\examples\instr\niHSDIO. I hope this helps. Please let us know if you have any further questions or concerns. Thanks, and have a great day.

 

Regards,

DJ L.

0 Kudos
Message 18 of 18
(1,084 Views)