Go to Post The difference between a Tinkerer and an Engineer is that the Engineer will be able to tell you the results before you start. - DonRotolo [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Spotlight this post!  
Unread 09-12-2004, 09:54
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: c debugger

um, would this code cause two pistons to fire assuming they are hooked up to relay 1 and relay2. also, you'll notice in my if statements that I used if its 1, then to execute the stuff, is that the right way of asking if the switch is one, or should I do (p2_sw_trig01), I've seen that but didn't know what it meant. what's the correct way? thanks.

Code:
 if (p1_sw_trig = 1) {
  relay1_fwd = 1;
  relay1_rev = 0;
  relay2_fwd = 1;
  relay2_rev = 0;
}
  if (p1_sw_trig = 0) {
 relay1_fwd = 0;
 relay1_rev = 0;
 relay2_fwd = 0;
 relay2_rev = 0;
}
  if (p2_sw_trig = 1) {
  relay1_fwd = 0;
  relay1_rev = 1;
  relay2_fwd = 0;
  relay2_rev = 1;
}
  if (p2_sw_trig = 0) {
 relay1_fwd = 0;
 relay1_rev = 0;
 relay2_fwd = 0;
 relay2_rev = 0;
}
 


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
Debugger and Simulation in new IDE? authgeek1218 Programming 1 08-12-2003 18:39


All times are GMT -5. The time now is 14:07.

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