Quote:
Originally Posted by mayazk
thank you, i understand that. But i was wondering how you program it to do something???
|
Well, it's really easy, especially if you are using easyC. What they are are just digital inputs to the OI, which reads them similar to a limit switch, either a 1 or 0 depending on whether the switch is open or closed. With easyC, you can use the OI Digital Input located under the RC Control section of the interface to assign the switch to a variable. Then, you can use an If statement to program it to do something for ex., and I apologize if the format isn't correct since easyC takes care of that
if (trigger_switch == 1)
motor_output = 255;
else
motor_output = 127;
I think that's right... but it's saying if you press a button that has been declared "trigger_switch" the motor that motor_output is associated with will run full bore one direction, and if let up on the trigger, it will stop.
Malhon
__________________
2007-
Midwest Regional-
Regional Finalists with 1000 and 447
Rockwell Automation Inspiration in Control Award
Regional Woodie Flowers - Ed Wegscheid
