LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone ever tried to read PWM from arduino and then use a waveform chart to plot the the same PWM signals? GERDW? Mr. Altenbach? Paul? Anyone?

So I am able to generate PWM, but can't generate the square wave signal on the waveform chart. 

All I get is 0 signal across. I have attached my code. 

GRCK5000_0-1649280870132.png

 

0 Kudos
Message 1 of 5
(834 Views)

Don't you want to connect the DI input?

 

Why do you think that the pulse width output should give you a square wave? Isn't the pulse width relatively constant unless you change the duty cycle?

 

(Sorry, I have no experience with this hardware. Just guessing!)

 

ALSO:

  • Branching the empty array wire to the history and the loop edge does not guarantee that the chart clears before points are written (both happen in parallel!). To ensure that the property executes before the loop can start, you need to wire its error out to the loop edge.
  • Why do you think you even need to reset the VI to default? Why do you do itin parallel to the rest of the code? (If you do, it should happen before the loop starts, right! See above point!)
  • Why are you hiding the stop button and why does it have the wrong mechanical action?
  • At one point some of us will ignore VIs that have the front panel and diagram maximized to the screen. Too annoying!
  • Numeric control" is not a good label for duty cycle.
Message 2 of 5
(812 Views)

On top of what said, an Arduino is a simple micro-controller who's CPU is neither multi-threading nor nulti-tasking.

 

So you Cannot just split the Error cluster expect it to run two sub-vi's in parallel like you can running LabVIEW on a computer.

 

The (Linx or whatever) code on the Arduino has to be linear and sequential as an Arduino can only do one thing at a time

 

On a side note this is why I do not recommend using an Arduino and Linx to learn LabVIEW.

========================
=== Engineer Ambiguously ===
========================
Message 3 of 5
(802 Views)

I have to admit. This answer deserves to be a solution even though it's not directly the solution to the question. hahah..... That's why I always enjoy when you answer my question, I always learn something. To me, It's more about learning valuable things than directly getting direct answers to my problem. Your answer, Mr. Altenbach, will definitely help me with my code. I'm putting what you said on my note. 

0 Kudos
Message 4 of 5
(796 Views)

Good to know! I didn't know that. Thanks RTSLV!!!!

0 Kudos
Message 5 of 5
(793 Views)