LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

100 microseconds pulse using PCI6533

I was able to create a VI that could handle one line based on the External clock VI you had above.  When I tried expanding it to multiple lines, it gave me an error that said  Error -200463 occurred at DAQmx Write (Digital 1D Wfm NChan NSamp).vi:1

Measurements: Specified read or write operation failed, because the number of lines in the data for a channel does not match the number of lines in the channel.

If you are using the Digital Waveform datatype, make sure the number of lines in the digital waveform matches the number of lines in the channel. If you are using boolean data, make sure the array dimension for lines in the data matches the number of lines in the channel.

Number of Lines in Channel: 1
Number of Lines in Data: 8

Task Name: _unnamedTask<34>

This didn't make sense because I had 8 lines in the physical channel  input to the Daqmx Vi   Dev1/port0/line0:7

0 Kudos
Message 11 of 37
(1,481 Views)

Thanks Ravens Fan!

I forgat to mention that I am using labview 7.1.  Would you mind to convert this solution to 7.1?   Or could someone help me to convert this vi to 7.1.  Thanks again,

Frank

 

 

0 Kudos
Message 12 of 37
(1,478 Views)

Hi all,

I believe the following Developer Zone article will help to clarify how to perform this operation.

Specifying the Pattern and Frequency of a Digital Waveform

The Multi_Dig_Wvfrm_Write.vi writes two separate waveforms to two channels all that is needed is to expand the boolean array to three columns and configure the VI to write to three lines. I hope this information clarifies things and please let us know if you have any further questions.  
JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 13 of 37
(1,471 Views)

Okay try this.  For some reason when I saved it back it through up some erros about the boolean to digital waveform (7.1 doesn't have a sample rate input???)  and an insane object.  It did not like the the digital waveform graph it created.  So I deleted that.  The waveform that came out had a dt of 1 (rather than .0001 in my LV 8.2 system)  It may be necessary to redo some code to fix the dt and add a waveform graph.

I had issues with trying to do multiple lines as I stated before.  But if you can get the concept working with a single line, then that is one step down and a matter of expanding it to more lines.  If things don't work and you post more questions, be sure to include error codes and any messages you get.

Unfortunately, I am about to the limits of how much I can help due to my knowlege of digital waveforms running out, and also the time I need to commit to other work.

Good luck!

0 Kudos
Message 14 of 37
(1,469 Views)

Ravens Fan. . . Thanks very much for your time and proposed solution.  I tried several changes but I could not make it work yet.  One of the errors that I got is the same as you have mentioned before:

Error -200463 occurred at DAQmx Write (Digital 1D Wfm NChan NSamp).vi

Possible reason(s):

Measurements: Specified read or write operation failed, because the number of lines in the data for a channel does not match the number of lines in the channel.

If you are using the Digital Waveform datatype, make sure the number of lines in the digital waveform matches the number of lines in the channel. If you are using boolean data, make sure the array dimension for lines in the data matches the number of lines in the channel.

Number of Lines in Channel: 1
Number of Lines in Data: 8

Task Name: _unnamedTask<3B6>

However I have looked at link mentioned by JaceD and I was able to get 100uS pulses on P0 and P2 for each individual lines (16 lines).  But still I need to find solution for all 32 lines.  Please see reply to JaceD for more details.  Thanks again for your help.

Frank

 

 

0 Kudos
Message 15 of 37
(1,451 Views)

JaceD,

Thanks for this info and I have been able to generate 100us pulse on each line of port0 and port2.  I can generate 100us pulse on one, 2, 3 or all 8 lines for each port; but I need to still generate 100us pulse on all 32 lines.  Could you please look at this modified vi and see if you could suggest some changes to make it work for all 4 ports (A,B,C,D).  Thanks,

Frank,

 

 

Download All
0 Kudos
Message 16 of 37
(1,452 Views)

Hi Frank,

From the work you have done thus far, the simplest solution for you is to create an array 32 columns wide where each column is a digital line. Then when you specify which lines to write to use the format of Dev2/Port0/line0:1,Dev2/Port1/line0:1, etc. This will write to the specified lines in all 4 of your ports. There are other methods to complete this such as using the NI Digital Waveform Editor, but based on the code you already have building an array would be the quickest solution for you. The code you posted should work with the above modifications. Please let us know the results and if you have any further questions.

JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 17 of 37
(1,430 Views)
you might want to treat the whole 32bits as one single channel, then it is easy to send a pattern. this waveform would have to be calculated either in advance, including all "empty" times, or on the spot with some advance filling of buffer.
you can see how i do it in this thread for using the DAQmx drivers.

for creating the 1channel, i just connect together 4 U8. each U8 is a waveform of its own. they all begin together, and this treatment makes the relative timing of the pulse deterministic.
hope i could be of some help.


-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 18 of 37
(1,421 Views)

Thanks Jaced,

However I have tried your suggested approach I can not make it work quite right.  Here is my latest vi with 2 channels P0 and P1 (only two rows and 16 columns).  Could you please modify this vi with your suggested approach and I will transfer your solution to the 32 lines version (I am using LV7.1).

I don't quite understand your comment "specify which lines to write to use the format of Dev2/Port0/line0:1,Dev2/Port1/line0:1, etc. "   When I tried it gives me the following error:

Error -200898 occurred at DAQmx Write (Digital Wfm 1Chan NSamp).vi
Possible reason(s):

Measurements: Partial use of physical lines within a physical port is not supported by this device, given the requested Sample Timing Type.

Consider specifying the entire port and tristating the lines you do not want driven.

Property: SampTimingType
Requested Value: Sample Clock

Output Channels: Dev2/port0/line0...

Therefore it will be better if you could include a sample of how to do this on this attached vi.  This is my first time that I am using this type of hardware and I am not very familiar with its commands or functionaliity.  Thanks again for you help on this matter,

Frank

 

0 Kudos
Message 19 of 37
(1,419 Views)

I am curious to see how all of this turns out hoping to learn more about digital input and output in the process.  All of the digital input and output I have done to date has been single sample or line.  Turn on or off a line when desired to drive a single relay.  DIO seems almost more complicated than analog in that it can refer to individual lines, ports as a collection of lines, perhaps even ports strung together.  I can only work with simulated devices in figuring this out, and it seems like different devices have different ways of calling their lines and ports.  Your posted example seems to reflect this as it now says "Dev2/port0_16" which is different from Jaced's channel.  But that was more like what you had in your reply 7 VI as "Dev1/port0/line0:7"

I tried playing with simulated devices at home last night.  At first I thought I was making progress, but them I got error messages about the device not supporting SIMD extensions.  There is such a combination of clock lines and names, port names, line names etc.  I can understand why it is a struggle to get this working right.

With respect to your last e-mail, I saw that Jaced had said"

"specify which lines to write to use the format of Dev2/Port0/line0:1,Dev2/Port1/line0:1, etc."  I think that is causing the error you are seeing because it is calling out only two lines one each port.  Try it with line 0:7 rather than 0:1

0 Kudos
Message 20 of 37
(1,413 Views)