Jump to content

Set duty cycle using For loop counter


Recommended Posts


I am trying to build a code that will automaticly read the pressure signal (as voltage) from 8 seperated valves and will write all the data recived to an excel sheet.

I want to ba able to change the blower speed with the indicator of the For loop. It works for the 1st. iteration (speed=0 full speed) but for the second iteration(speed=0.1) i get an error:

Error 5001 occurred at :

PWM Set Duty Cycle N Chans.vi >>
Set Duty Cycle.vi >>
Send Command.vi

Appreciate the help,

Sahar & Liat.


activate digital ports3.vi

Link to comment

Is the VI you sent at all related? I don't see any read, any blower, any excel. Nor a for loop, for what matters. Besides I don't have any of this Digilent/LINX VIs. Not knowing the hardware, I can't say if calling in parallel two "Digital Write" and one "Set Duty cycle" is legal or is supposed to cause errors. What I can read from the code is only that since you have "Enable automatic error handling" enabled on in your VI properties (Execution), any error generated by the two bottom subVIs will pop up a dialog. What is for that toolset Error 5001 I don't know.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.