In SX Microcontrollers, SX/B Compiler and SX-Key Tool, VelocitąPaola wrote: You can't pass pins through subroutine parameters, nor can you use a variable to declare a pin in the PULSOUT command. You would need to implement your code like this: [code] Main: SERVO 1,150 SERVO 0,100 goto main ' ----------------------------------------------------------- ' Subroutine Code ' ----------------------------------------------------------- SERVO: ' USE: SERVO servo#, pulse duration IF __PARAM1 = 1 THEN PULSOUT Servo_Grip, __PARAM2 ELSE PULSOUT Servo_Base, __PARAM2 ENDIF ENDSUB [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=263425#m263427 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)