Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Ouput Generation

Hi
 
I require to generate an square wave and write it to a digital output channel of a M 6259 multifunction DAQ. I have attached the sample programme. I cannot see the output wave form from the oscilloscope connected to DI0 (signal) and ground to DGND. Further there is an error when I run the programme.I would be greatfull for your help.
 
Thanks
 
Mal
0 Kudos
Message 1 of 19
(5,180 Views)

Let me guess. You're getting error -200463? If that's true, it's because your analog to digital waveform function is specifying 16 lines (bits) which is the default. If you had placed a digital waveform graph on the output, you would have seen this. When you get an error, you also get a description and the description of this error is pretty clear.

If this is not the error code you get, what is? It's not very helpful if you don't include the error code in your postings. We shouldn't have to guess.

0 Kudos
Message 2 of 19
(5,158 Views)

Hi

Thanks. You are correct. I am getting that error message. How can I get about it so I can get the square wave output at DIO0?

Appreciate your help.

Thanks

Mal

0 Kudos
Message 3 of 19
(5,154 Views)
As I said, don't specify 16 channels of data in the Analog to Digital Waveform function. Do you see the input called Resolution (16 bit)? I'm assuming you only want 1 bit since you only want to drive a single digital output. If you want to driver two outputs, write a 2 there. For three outputs, write a 3, etc.
0 Kudos
Message 4 of 19
(5,148 Views)

Hi

 

Many thanks. It works fine for a single output when I gave 1 for resolution. I require to drive many outputs on several digital lines. I amended the above programme (attached) so I can output independent square wave forms (whose properties can be altered as required). I get the out put ( seen from an oscilloscope) from DIG0 but I only get 0 volts at DIG 1 in the programme. However I get no errors.I would be greatful if you can help me on this.

 

Mal

0 Kudos
Message 5 of 19
(5,142 Views)

I am sorry here is the attached programme.

Thanks

Mal

0 Kudos
Message 6 of 19
(5,140 Views)
Hi Mal,

I just tried your VI with my M Series board and I got a signal on the 2nd digital line no problem. Are you sure you had it connected properly?

If you're planning on writing to multiple channels it might be worth grouping channels together, rather then configuring a task for each channel. You can specify more the one channel when you create the channel and you can wire the required number of channels to the analog to digital converter. See attached example.

Kind regards,

Sarah Brady
National Instruments | UK
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 7 of 19
(5,110 Views)

Hi

 

Thanks. But I have 7.1. Can you please attach the JPEG image of the front panel and block diagram of your code so I can wire them in 7.1.

Greatfull fpr your help

 

Mal

0 Kudos
Message 8 of 19
(5,103 Views)
Hi Mal,

Attached is the VI in version 7.1

Kind regards
Sarah
NI | UK
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 9 of 19
(5,087 Views)

Hi

 

Many thanks. I require to generate a few independent square wave whose properties ( frequency, duty cycle, switching it on and off ) I require to change (independently) as per my requirement. My earlier programme worked once I checked the connections, as you told. However I see an offset between the two wave forms when seen from a  digital oscilloscope ( the mark is offset). Do you get this result. Is there a way of solving this.

Further can I wire the independent square waveforms generated to a single task (write.vi)?

 

Many thanks for your help

 

Mal

0 Kudos
Message 10 of 19
(5,085 Views)