Go to Post FIRST isn't about money or robots... it is about people. Take care of that and the rest will follow. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2007, 01:38
Wompas Wompas is offline
Registered User
FRC #1182
 
Join Date: Jan 2007
Location: Missouri
Posts: 7
Wompas is an unknown quantity at this point
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   Spotlight this post!  
Unread 31-01-2007, 01:51
Francis-134's Avatar
Francis-134 Francis-134 is online now
Lifer
FRC #0190 (Gompei and the Herd)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Worcester, MA
Posts: 597
Francis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond reputeFrancis-134 has a reputation beyond repute
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.
__________________

Email | Twitter | Facebook | YouTube | Twitch
iTunes Podcast | Snapchat

A proud alumnus of teams 134 and 40 || Mentor of Team 190 || Director of Fun for BattleCry@WPI
  #3   Spotlight this post!  
Unread 31-01-2007, 12:39
Wompas Wompas is offline
Registered User
FRC #1182
 
Join Date: Jan 2007
Location: Missouri
Posts: 7
Wompas is an unknown quantity at this point
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   Spotlight this post!  
Unread 31-01-2007, 19:27
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
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.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #5   Spotlight this post!  
Unread 31-01-2007, 23:18
Wompas Wompas is offline
Registered User
FRC #1182
 
Join Date: Jan 2007
Location: Missouri
Posts: 7
Wompas is an unknown quantity at this point
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   Spotlight this post!  
Unread 01-02-2007, 09:05
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
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
      }
This will map the thumb and trigger to forward and reverse of the relay on port 1.
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
Attached Files
File Type: zip pressure.zip (13.4 KB, 40 views)
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 01-02-2007 at 10:20.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 10:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi