From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pwm to control with compacRIO

Solved!
Go to solution

hi,i am working in pwm,i have the next code in labview to control it with compactRIO

http://imageshack.us/photo/my-images/24/pwmlabview.png/

the problem is that i don´t understand the flat sequence structure and the components which are conected to it

somebody could help me with it?

thanks

0 Kudos
Message 1 of 5
(2,389 Views)

This forum allows you to upload images and VIs directly.  Please use that functionality rather than third-party sites.

 

The reason for the flat sequence structures is that the Wait function does not have error terminals, so there is no way to dictate order of execution without wrapping it in a structure.  The code sets the digital output ON, waits for a specific amount of time, sets the digital output OFF, and then waits for a second amount of time.

0 Kudos
Message 2 of 5
(2,383 Views)

ok,sorry about the image

so,the first flat sequence structure works just at the high time and when that time  is finished, the second flat sequence structure works at the low time?

or if the first or the second works,depends about the digital input?

 

0 Kudos
Message 3 of 5
(2,380 Views)
Solution
Accepted by topic author mariomoskis

Both sequence structures always execute on each iteration of the while loop.  The first sequence structure waits during the ON time.  The second waits during the OFF time.  The wire carrying the error cluster (the gold/black wire in the image) dictates the order of execution because it is an input and output from both the digital IO nodes and the sequence structures.  If this isn't clear, turn on execution highlighting (the light bulb icon in the toolbar) so you can watch as it runs.

0 Kudos
Message 4 of 5
(2,372 Views)

thanks

0 Kudos
Message 5 of 5
(2,369 Views)