Here's an example to get you started. One note: even if you wish to keep frequency constant and only change the duty cycle, it's still necessary to write both the freq and duty cycle on each update.
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Sorry BcGam, I haven't done any CVI. All I can help with is to say it should be possible -- I *have* changed pulse specs on the fly on another M-series board under LabVIEW.
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
BcGam....you should be able to find an existing shipping example for CVI and with only a few modifications get the same behavior. Look at the Digital Pulse Train-continuous example. You should then only need to make a few modifications by calling the counter write VI (in DAQmx 7.3 you no longer need the property node)in you loop to update the duty cycle.
Hi, using the example provided in reply #2, I receive this error periodically:
Error -200301 occurred at Property Node DAQmx Channel (arg 1) in Pulse Width Modulator-daqmxb.vi
Possible reason(s): Cannot update the pulse generation property. The pulse generation with previous property settings must complete a full cycle before the property can be updated. Task Name: _unnamedTask
It seems that the program is trying to overwrite a counter property before a single cycle has completed. However this error occurs even when i'm not changing the frequency or duty cycle inputs. When I use the cpu for other tasks such as using a browser, this problem seems to occur more frequently. Is there a way to fix this?
Hi, using the example provided in reply #2, I receive this error periodically:
Error -200301 occurred at Property Node DAQmx Channel (arg 1) in Pulse Width Modulator-daqmxb.vi
Possible reason(s): Cannot update the pulse generation property. The pulse generation with previous property settings must complete a full cycle before the property can be updated. Task Name: _unnamedTask
It seems that the program is trying to overwrite a counter property before a single cycle has completed. However this error occurs even when i'm not changing the frequency or duty cycle inputs. When I use the cpu for other tasks such as using a browser, this problem seems to occur more frequently. Is there a way to fix this?
Hi, using the example provided in reply #2, I receive this error periodically:
Error -200301 occurred at Property Node DAQmx Channel (arg 1) in Pulse Width Modulator-daqmxb.vi
Possible reason(s): Cannot update the pulse generation property. The pulse generation with previous property settings must complete a full cycle before the property can be updated. Task Name: _unnamedTask
It seems that the program is trying to overwrite a counter property before a single cycle has completed. However this error occurs even when i'm not changing the frequency or duty cycle inputs. When I use the cpu for other tasks such as using a browser, this problem seems to occur more frequently. Is there a way to fix this?