PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to produce separate pulses on separate physical channels of a PXI-6552

Hello, 

 

I am attempting to generate two pulses, each of which is to have a unique delay and width. I am using a PXI-6552 to generate the pulses and an SMB-2163 to split the channels. 

 

I have written a basic LabVIEW program to do this, employing the HSDIO series of drivers. I have attached a copy of my .vi to this post. 

 

However, when I run my program with the first two channels of the SMB-2163 (DIO 0 and DIO 1) rigged to a multichannel oscilloscope, I see both pulses originating from the same channel (DIO 0) and nothing coming out of DIO 1. I wish to produce Pulse1 on channel DIO 0 and Pulse2 on DIO 1, but this is not happening. 

 

As a side note, in the future I plan to extend this program to produce around 10 pulses, each on different channels, and to cycle the pulse generation at 20 Hz. It is my goal to be able to scan both pulse delay and width in real time, as I am running the porgram. Any advice on how one might accomplish this in a clean and resource conservative manner would be greatly appreciated. 

 

Thank you in advance for your assistance and patience. I am new to LabVIEW and will be grateful for any input. 

 

Best,

 

Drew 

0 Kudos
Message 1 of 2
(3,299 Views)

Hi Drew,

 

Thank you for posting. After taking a look at you're VI, it looks like you are writing a waveform that is being coerced into Unsigned 32-bit data. What this means is that the pulse you are trying to write is showing up in the least significant bit of the waveform data, which corresponds to DIO 0.

 

You have several options for generating different waveforms on different channels.  

 

You can build waveforms using the NI Digital Waveform Editor and then read the files to output. This is an intuitive way to accomplish you're task. You can generate a HWS file using the example Read HWS File and Generate.vi which is located in the LabVIEW Example Finder (LabVIEW » Help Menu » Find Examples... » Browse Tab » Hardware Input and Output » NI-HSDIO » Dynamic Generation » Non-Scripted).

  

You can also use for loops to build you're waveform or the Pulse Pattern VI that you were previously using. Just keep in mind that each bit represents each channel. If you want to output on DIO 1 instead of DIO 0, you can "rotate" or shift the bits so that you're data corresponds to the correct location in the U32. Additionally, the example Dynamic Generation of Multiple Waveforms.vi from the Example Finder is a good starting point for this application. 

 

Please let me know if you have any further questions! 

 

Regards,

Aaron

National Instruments
0 Kudos
Message 2 of 2
(3,249 Views)