01-30-2009 03:56 PM
I am trying to run this program that creates a PWM that is at 10Hz and varies that PWM from 20-70% duty cycle for a minute then resets and runs again from 20-70% continuously. I have code that works but it gives me a -200301 error. I see that this error is caused by "The pulse generation with previous property settings must complete a full cycle before the property can be updated." However my software loop is at 200ms and my Period is 100ms so I don't understand why this error still exists.
How do I get rid of this error and correct the attached code. This problem is pretty urgent.
Thanks
Chris
02-02-2009 11:31 AM
Hi Chris,
Thanks for your post and I hope your well.
I was just reading through the forum and saw your post.
Does the example code here,
How Can I Change the Duty Cycle on My Continuous Pulse Train?
http://digital.ni.com/public.nsf/allkb/82C9F3C15F62974E86256EBA0058CAF5?OpenDocument
generate the error? This code does seem slightly differently programmed to yours. As it uses the property nodes to alter the duty cycle. please note you can't change the frequency on the fly.
What happens if you increase the wait to a much large amount?
Please let me know how you get on,
02-02-2009 11:49 AM
I will try thier example.
After I submitted my post I tried to change the wait to a large number (inside the while loop) and it didn't make a difference then I changed the delay after the start task operation to different values and the same error came up until I set it for 10000ms or 10 Seconds. Now it pulses once and delays for ten seconds and then runs like it should. Seems quirky to me and like a NI issue.
Chris
02-03-2009 03:26 AM
Hi Chris,
Thanks for the reply.
I would recommend looking at the code example. It is efficent because the use of event structure only alters the DAQmx read when necessary - rather than every iteration. Using the Counter output freq task compared to the Counter Output Pulse Time gives you the inputs of frequency and duty cycle rather than High and Low times - this seems more of what you require. Also you use of the DAQmx Wait until Done is going to add some delay into your code - notice the example doesn't use this either. The use of property nodes just affects the attributes of the Counter output task rather than alterting the data being used for the DAQmx write.. I'm sure this could affect the way the code will operate.
Please let me know how the example works out, and let me know if you have any other questions.
01-11-2018 07:49 AM
Hi,
I am facing the same issue but with a more simple VI executing only once (not in a loop). I can't understand why it is happening since I am not calling the "DaqMX Write.vi" again. Notice that this VI was working before I update the NI drivers to the 17.6 version.
I use this VI to control a heater in a water tank.
Best regards
Felipe Brochier
01-12-2018 04:03 PM
Have you consulted the page that we have about error -200301?
Take a look at this page and see if it pertains to your issue.
http://digital.ni.com/public.nsf/allkb/5F4D0C03B345468986256E85005A2FCC
Also, have you tried rolling back your DAQmx driver to the previous version to see if the issue persists?
You can do that by uninstalling the current version of DAQmx and then downloading and installing the version of DAQmx that you previously had installed.
01-29-2018 12:21 PM
Dear Casey,
Thank you for answering my question. I had consulted the page about the related error, but my problem is that I'm testing the VI outside a loop so it shoudn't be faster than the timeout of the function... I'm thinking that a possible turn around would be to place a timed sequence.
Also I cannot return to the previous version of the driver because I need the current version to run the modules 9208 that were not supported in the previous version.
Best regards
Felipe Brochier
01-30-2018 05:03 PM
Are you starting the task and configuring the timing in MAX? I see there are no DAQmx functions to start the task or set up the timing in LabVIEW. Maybe try implementing those functions. The counter might just have trouble changing its settings before actually being started.