Discussion:
Using NI 9481 and 9474 to control digital output and relays
(too old to reply)
okiepiper
2008-05-06 02:10:08 UTC
Permalink
So...  I am controlling several values by writing to 9474 (Valve Port A) while also switching a (one) relay on 9481 (Pump Relay).   I initially built a separate vi with the "Pump Relay" which worked fine.  The attached vi w/o "Pump Relay" also works fine.  When the two are combined, the "Pump Relay" only pulses - not staying on continuously.  Is this one of those situations when I need to string everything together like I did with the analog inputs?  If so, help!  I tried stringing all of the digital output together w/o success...  Thanks in advance!


vi.pdf:
http://forums.ni.com/attachments/ni/170/321209/1/vi.pdf
okiepiper
2008-05-06 17:40:08 UTC
Permalink
Bump...
Paul C.
2008-05-06 18:40:07 UTC
Permalink
Hi Okiepiper, I believe the problem is more likely due to the case structure or something with the code rather than how you have it setup.  The reason you needed to string all of the analog inputs together is because they are all correlated using the timing on the Compact DAQ or Compact Rio chassis.  They only have a single analog input timing engine so they all must be configured together in the same task.  The same thing applies to correlated digital.  However, it looks to me that you are just doing static digital (without timing) which can be configured from multiple tasks.  The key point here is if you want timing you have to configure them all together in one task.  For tasks without timing, you can configure them individually.  My recommendation would be to place probes throughout the logic statements before the case and make sure that isn't what is pulsing the relay lines.Regards,Paul C
okiepiper
2008-05-19 19:10:05 UTC
Permalink
Paul,     Thanks for the response.  I have traced the problem to the comparison of measurement N and N-1 from the feedback node ( I labeled the lines "pulses" in the diagram).  In cases when the "pulses" line should be constantly true the output toggles between false/true (with each loop execution I guess).   Your guidance is greatly appreciated...Regards,Chris


ViImage.jpg:
Loading Image...
Scott_G
2008-05-20 17:40:12 UTC
Permalink
Hi Chris,
If you are getting unexpected outcomes, the data upstream of the comparison must be different than expected.  Have you tried probing both the data coming out of the feedback node and going into the feedback node to ensure that you are getting the expected values for both?  It seems like noise might be causing something such as this.  Does it consistently switch between true and false on every iteration or does it just go to false once every few iterations or so.  It may be helpful to take multiple samples and average them together before doing the comparison so that some of the higher frequency noise is not as noticeable. 
Loading...