Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying the writing to digital line(USB 6343)

Hi,

I am trying to write  array to the digital output line.

If I don't do any changes with the array size the result is ok,but If

I am trying to insert an array of different size during the running time I don't get the desired result.

I am new to Labview(So maybe I am working in the wrong way)

I will be glad to get some comment about this way of writing to the digital output line.

The files are attached.

Thanks Leonid,

Download All
0 Kudos
Message 1 of 8
(1,998 Views)

Leonid, 

 

Thank you for using NI forums! I ran your code, and I didn't run into any errors. What are you wanting to do? What is the desired result? What would you like to see different?

 

Katie

Katie Collette
National Instruments
0 Kudos
Message 2 of 8
(1,989 Views)

Hi Katie and thanks for the reply.

I try to use the digital output line for PWM and frequency tuning.

My idea was to build array which size is the ratio between the clock frequency and the desired output frequency.

The values(1,0) in array are arranged according the duty cycle.

 

When I run the program the results are accurate(I was using  oscilloscope),but when I changed the value of the frequency (thus changing the size of the array) I did not get the desired result.

When I changed the duty cycle the result was very accurate.(The size of the array did not change).

 

Is it a problem the changing of the array size when I am writing to the digital line?

 

Thanks,

Leonid

0 Kudos
Message 3 of 8
(1,986 Views)

It sounds to me like you should consider generating the PWM with a counter rather than a digital line.

You can change freq and/or duty cycle on the fly seamlessly without needing to manage big arrays

full of digital state info. 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?
0 Kudos
Message 4 of 8
(1,963 Views)

Hi Kevin,

I need to generate 32 different signal so the 4 counter output ports are not enough.

Thanks,

Leonid

0 Kudos
Message 5 of 8
(1,958 Views)

Hi Kevin,

I need to generate 32 different signal so the 4 counter output ports are not enough.

Thanks,

Leonid

0 Kudos
Message 6 of 8
(1,958 Views)

Gotcha.  Sorry, I'm running 2010 and can't open the example you posted.

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?
0 Kudos
Message 7 of 8
(1,951 Views)

Thanks anyway

0 Kudos
Message 8 of 8
(1,947 Views)