![]() |
And yet, ANOTHER questions
I know you guys are thrilled to hear another question for me. But, forgive me, I'm truly not very good at this. And at the crucial moments, I am able to think even less...
I have this compressor code. If anyone can find something wrong with my syntax, or something else, please let me know. Thanks! high_pressure VAR rc_sw2 compressor VAR relay3_fwd pressure_check: If high_pressure = 0 THEN compressor_go_on If high_pressure = 1 THEN compressor_go_off compressor_go_on: compressor = 1 goto end_pump compressor_go_off: compressor = 0 goto end_pump end_pump: |
The first thing I notice is that the pressure switch values are reversed. The pressure switch is normally closed, and opens when the system pressure reaches 115 psi. So I would change your code like so:
Code:
If high_pressure = 1 THEN compressor_go_on |
Re: And yet, ANOTHER questions
Quote:
If high_pressure = 0 THEN gosub compressor_go_on If high_pressure = 1 THEN gosub compressor_go_off i believe you forgot the gosub command. i may be wrong though. |
Actually wasn't my fault
The team has a problem with blaming all mistakes on the programming. This time, my friend, it was the electrician's fault... haha.. Oh well.
Thanks anyway! |
easier code (even though your's does work)
compressor = high_pressure |
Re: Re: And yet, ANOTHER questions
Quote:
|
question
Quote:
Code:
compressor = ~high_pressure-Kesich |
the switch is closed (1) when it is below pressure and open (0) when it is full. See the pneumatics manual
Quote:
Like gwross said, the variable name high_pressure is a misnomer. It is a 1 when low pressure, and so should probably be called low_pressure |
Re: And yet, ANOTHER questions
Quote:
|
| All times are GMT -5. The time now is 18:27. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi