|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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: |
|
#2
|
|||||
|
|||||
|
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 If high_pressure = 0 THEN compressor_go_off |
|
#3
|
|||||
|
|||||
|
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. |
|
#4
|
|||
|
|||
|
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! |
|
#5
|
||||||
|
||||||
|
easier code (even though your's does work)
compressor = high_pressure |
|
#6
|
|||||
|
|||||
|
Re: Re: And yet, ANOTHER questions
Quote:
|
|
#7
|
|||||
|
|||||
|
question
Quote:
Code:
compressor = ~high_pressure -Kesich Last edited by Anthony Kesich : 13-02-2003 at 00:39. |
|
#8
|
||||||
|
||||||
|
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 Last edited by Joe Ross : 13-02-2003 at 01:08. |
|
#9
|
||||
|
||||
|
Re: And yet, ANOTHER questions
Quote:
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A few questions | goegan31 | Regional Competitions | 1 | 09-03-2003 20:32 |
| $3500 limit - Who does not have questions | Raul | Rules/Strategy | 5 | 12-01-2003 11:31 |
| traction questions | AlbertW | Rules/Strategy | 2 | 05-01-2003 17:58 |
| pre-inspection preparation questions | Adams High Man | OCCRA | 7 | 22-10-2002 22:22 |
| Update 7 - Behind Schedule (or out of questions)? | archiver | 2000 | 2 | 23-06-2002 22:58 |