LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone please please help? I combined arduino and MCC DAQ? Problem reading analog voltage (see attached VI)

Solved!
Go to solution

I am using arduino to output the PWM and MCC DAQ to read the update analog voltage. It was working at some point. So every time I would change PWM, the analog voltage would change accordingly. Now, the voltage is not updating anymore when I change the PWM. 

So for 100% duty cycle - I am expecting 0.095. I don't have any problem with this. The only problem that I am having is when I changed it to lower duty cycle, I kept getting 0.095 as you can see. I tried to throw an invoke node to reinitialize values, but it's not working. 

 

Good  analog value

PWM1.PNG

 

Wrong analog value

PWM1 wrong value.PNG

0 Kudos
Message 1 of 3
(760 Views)
Solution
Accepted by topic author GRCK5000

Hi GRCK,

 


@GRCK5000 wrote:

I am using arduino to output the PWM and MCC DAQ to read the update analog voltage. It was working at some point. So every time I would change PWM, the analog voltage would change accordingly. Now, the voltage is not updating anymore when I change the PWM. 

So for 100% duty cycle - I am expecting 0.095. I don't have any problem with this. The only problem that I am having is when I changed it to lower duty cycle, I kept getting 0.095 as you can see. I tried to throw an invoke node to reinitialize values, but it's not working. 


Do you get any errors? Did you debug your VI (using probes or additional indicators)?

 

Keep in mind: we don't have your hardware, neither your Arduino, no ULx device and not your UUT!

You need to provide a lot more information to expect/get any usable help…

 

What's the point of setting the DutyCycle increment property so often?

Why don't you place PWM output and AI reading into just one loop?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(729 Views)

Hi GerdW,

 

Yes, sorry about the duty cycle increment. I really don't need it. 

Thanks a lot! it worked.  when I tried to put them in one loop last time, it didn't. So I thought it was because I was using two different libraries. Now, it's working fine as expected. You are awesome!!!! You deserve a 1000 kudos.

 

0 Kudos
Message 3 of 3
(717 Views)