From: KevC on 27 Mar 2006 04:40 Hello Everyone. I have built a PWM controller using the Labview 7.1 shipping example PWM conrtrol, see atatched The reference signals are input voltages, and the output is a PWM of varying duty cycle. The vi runs on the 7041e RT card. The vi runs fine, but then after a period (varying) of time the physical channel stops updating, even though a changing duty cyle is being written to it, If anyone can help me it would be greatly appreciated. Regards Kevin PID PWM.vi: http://forums.ni.com/attachments/ni/170/175934/1/PID PWM.vi
From: SachaE on 28 Mar 2006 03:40 Hi Kevin, could you please post all your vi's onto the forums, not just the top level one. When we've been talking directly you included a error bitmap showing that you was getting an error condition out of the vi at some point, saying It appears that the system is not able to transfer data from the buffer memory on the DAQ device into PC memory fast enough. The reasons could be that the sampling rate is too high, too many channels are sampled from (you can verify if these are the causes by lowering the sampling rate and channel count to see if the same error occurs), or the system is trying to perform a time-consuming task in the background (try to close out unnecessary applications). This can happen after an indeterminate period of time, and is a system limitation - can you lower the acquisition rate, and see if that causes the error?You're currently set for 800 samples / second and this is software timed, so if you're hitting the default and waiting for 500ms, then this will cause a jitter in what's going on, and you're passing a larger than required 0-1500 into the counter duty cycle input which should be 0-1. (pulse period / cycle period)You could try putting a 0ms wait into the loop, to make sure that for a tiny period of time the code isn't actually doing anything.PID benchmarking that we have runs around 30kHz, which divides down rapidly as more channels get involved, so with the additional code you have in the loop you may be simply trying to run faster than the hardware is capable of.Is this code running headless on the RT target, or through the LabVIEW development environment (which will be taking up extra processing time)? Thanks Sacha EmeryNational Instruments (UK)
|
Pages: 1 Prev: Interfacing a C++ Console Application Genetic Algorithm with LabVIEW Next: VISA |