FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

FP-PWM-520 Resetting to 0% pulse width

I am trying to use an FP-PWM-520 module to set a voltage output from a PV panel.  I am having an issue trying to reset the module to 0% pulse width.  I am taking a measurement, using an FP-AI-110 module on the same FP-2000 logger, every 1 second.  The VI I have written takes some number of readings, currently set to 10, and then resets the PWM module to 0% pulse width to open the PV module and take a new reading.  The VI then recalculates a new pulse width, sends it to the PWM and I resume taking measurements. 
 
Am I wrong in assuming that I can reset, then set the PWM block 2 times in a matter of seconds?  Do I need to wait a specific amount of time before I send the reset and new pulse width? 
 
Thanks for your help.


Message Edited by upchuckjunk on 01-15-2008 05:25 PM
0 Kudos
Message 1 of 9
(7,952 Views)

Hi upchuckjunk,

From the FP-PWM-520 and cFP-PWM-520 Operating Instructions, it appears that the accuracy for the pulse width is -1, + 3 microseconds. There is nothing about a limitation on how fast you can send signals. I think you should be able to reset and set the data in a matter of seconds. What happens when you try to do this? Do you get an error message?

Let us know.

Regards,

Hillary E
National Instruments
0 Kudos
Message 2 of 9
(7,911 Views)

Every so often the channels do not reset, the channels retain their prior settings.  I have a 1 second delay between the reset channel state and the read AI channel state.  (I try to use state machines on all my code.)  There aren't any errors when the PWM block doesn't get reset, that is what mystifys me.  Is there a way to "force" it to reset every time, no matter what? 

0 Kudos
Message 3 of 9
(7,907 Views)
Hi,
Post your code so we can see exactly how you are reading and writing to your Field Point.  It sounds like the issue might be due to the way your are programming and not due to the Field Point behaving incorrectly.  If your application is very large then you will want to try to cut the code that does not affect the incorrect behavior and isolate the problem.  Also, have you written other applications using your Field Point and did you experience incorrect Field Point bahavior?  I would like to determine whether or not your Field Point has ever worked correctly.
Eric A.
National Instruments
Distributed I/O Product Support Engineer
0 Kudos
Message 4 of 9
(7,886 Views)
I have been using Fieldpoint successfully for data acquisition for 3-4 years now.  I am new to the PWM blocks.  The code I am running resets the FP-PWM block, writing an array containing  eight "0" to the block, then waits for 1 second, reads the FP-AI block.  I can post code, but will have to strip out quite a bit from the state machine before I post it.  As I stated above, the PWM does not always reset.  It seems to reset most of the time, but every 3-4 cycles, it fails to reset the PWM to 0%.  I know this because my voltages never reach the maximum values they should. 
 
To reset the blocks, what exactly do I need to do?  Do I need to wait a specific time?  Do I need to write some specific value to the block?  If I get answers to these questions, I know I can figure out what is going on with my code. 
0 Kudos
Message 5 of 9
(7,883 Views)
I have written a basic VI that attempts to reset the PWM block after every read.  I have included a wait delay, user settable and a delay after read.  This VI fails to reset the PWM block to 0% every time regardless of the delay setting, I must be able to rely on a reset after at the most 2 seconds. 
0 Kudos
Message 6 of 9
(7,871 Views)
Okay, so here is what I needed to do to fix the problem.  I increased the wait between read to 2 seconds and the overall wait delay to 1 second.  So I wait 1 second between writing to the PWM block and wait 2 seconds before I read the values on the AI block.  This seems excessively long, but it works.  There should be some sort of blurb defining the max or min time necessary to reset the PWM block. 
0 Kudos
Message 7 of 9
(7,861 Views)
I am still concerned that something else is not behaving the way it should.  As Hillary stated above, you should not have to wait any certain amount of time to reset the PWM module.  The next thing I would investigate would be how you know that the module is not getting "reset".  I would suggest finding a second way to verify that your module is not getting reset.  Also, I opened your VI and I do not see how you would ever use the "write_10" state and the comparison should never be true.  Either way that should not affect whether or not your module resets.
Eric A.
National Instruments
Distributed I/O Product Support Engineer
0 Kudos
Message 8 of 9
(7,857 Views)
Maybe the issue is that I am trying to run the app on the desktop and not embedded as it is designed to run. 
 
The VI is setup to switch PWM between 0% and 20%, even intervals are 0% and odd intervals are 20%.  This was a quick way for me to determine if the PWM block was getting reset.   As I stated above, I'll try it embedded and see if it works more reliably. 
 
Thanks.
0 Kudos
Message 9 of 9
(7,855 Views)