|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Pneumatic Pressure Switch for EasyC
My programming group has a much easier time using EasyC Pro for FRC than MP Lab. I noticed and read about the "Pressure Switch" button in EasyC Pro which is found under Outputs and it seemed to be exactly what we were looking for to turn the compressor on and off. After messing around with just the pressure switch button we could never get it to work.
Then we went back to old code made by a previous programmer in MP Lab that had the default pressure switch code and it worked perfectly, turning the compressor on and off appropriately. This is a really simple question really, I just want to know how people are successfully using "Pressure Switch" in their EasyC code. If someone could talk me through that that would be great. When I try it with EasyC , we can't even get the spike to work. |
|
#2
|
||||
|
||||
|
Re: Pneumatic Pressure Switch for EasyC
The easyC help file says that in order to get the pressure switch to work, you must place the block in the 'initilize' section of your FRC project. It should work if you put it there, but double check to make sure that the switch is connected to the digital input it is wired to, and that the spike is in the correct relay port.
|
|
#3
|
|||
|
|||
|
Re: Pneumatic Pressure Switch for EasyC
Yeah we tried that over and over and it doesn't work. If you've gotten it to work, could you copy everything you have in "initialize"?
|
|
#4
|
||||
|
||||
|
Re: Pneumatic Pressure Switch for EasyC
While in easyC PRO hit F5 and check to make sure the digital port you have the switch connected to is defined as an input. The arrow will point towards the dot.
|
|
#5
|
|||
|
|||
|
Re: Pneumatic Pressure Switch for EasyC
Right, we tried that. We've basically tried everything. This is really frustrating but any ideas are much appreciated.
It seems that we have even more of a basic problem now that we didn't even have a week ago. We abandoned the pneumatic pressure switch for now, just to see if we could just program a spike to work on a relay or a digital out and THAT doesn't even work. I mean I'm 99% sure I can program a simple spike but THAT doesn't even work. So my question now is, just to make sure I'm doing this right, whats a very elementary program I can make to make sure that my spike can work through a program. I know the physical spike is okay, but running a program to it does nothing. Even the most basic program such as a Relay Out always being on. I'm starting to become very concerned because if it's not a programming issue then I don't know what it is. If someone could link me a good EasyC forum elsewhere or even right here on CD that would be helpful also. |
|
#6
|
||||
|
||||
|
Re: Pneumatic Pressure Switch for EasyC
Have you tried the online window to see if you can fire your relays there?
Code:
while ( 1 )
{
OIToRelay ( 1 , 1 , 2 , 1 ) ; //Relay Port 2 FWD
OIToRelay ( 1 , 2 , 2 , 2 ) ; //Relay Port 2 REV
}
I have attached a precompiled program with the pressure monitoring function. Plug the compressor relay into Relay Port 1, Plug a Spare Relay into Port 2, Plug the pressure switch into I/O port 7. Joystick into port 1 on the OI Last edited by Kingofl337 : 01-02-2007 at 10:20. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Urgent need for Nason pressure switch!! PLEASE HELP! | haverfordfords | Pneumatics | 12 | 18-02-2005 02:04 |
| Pneumatic pressure switch | M. Hicken | Programming | 9 | 29-01-2005 23:35 |
| spike for pressure switch? | Rob Colatutto | Rules/Strategy | 4 | 23-02-2003 15:42 |
| pressure switch | Michael Long | Pneumatics | 1 | 11-02-2003 11:21 |
| Error found in programming for the pump and pressure switch | sjharobotics | Programming | 4 | 06-02-2002 17:46 |