|
Re: Pneumatics HELP
In the Begin vi, use the Compressor functions to Open a compressor and give it a name with a Refnum Set. Specify the relay powering the compressor and the digital input with the pressure switch connected.
In the Periodic Tasks vi, enable the existing bit of code that starts the compressor control loop. Replace the sample name with the one you used in Begin.
That's all it takes to have a compressor automatically come on when the pressure drops below 90 psi and turn off when it reaches 120 psi.
That red coercion dot is there because the Forward and Off constants you have connected to the Select function are Solenoid constants, and the Relay Set is expecting Relay constants. You can see this if you turn on the Context Help and hover the cursor over the blue wire coming out of them. They happen to be perfectly compatible with one another (Off/On/Forward/Reverse values are represented as 0/1/2/3 in both), so the dot is only a cosmetic issue. But you can fix it by deleting the existing constants and creating new ones based on the RelayValue input terminal of the Relay Set function.
|