In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tsaavik wrote: I have an Easy question :D if i do [code] Front_IR_Detect_Right VAR RB.3 ir_in_right = Front_IR_Detect_Right [/code] While running have i put the VALUE of [b]RB.3[/b] at that moment in time into [b]ir_in_right[/b], or is [b]ir_in_right[/b] just a pointer to [b]RB.3[/b] now? Lets say time passes and [b]RB.3[/b] changes state, will [b]ir_in_right[/b] change, or will it keep its earlier assigned VALUE? Here is my concern: [code] IF ir_in_right = yes THEN 'yes is 0 in this case right_Motor_A_Status = 1 right_Motor_A = 1 PAUSE Motor_Delay right_Motor_A = 0 right_Motor_A_Status = 0 ENDIF [/code] while running the above code in real life, the [b]right_motor_a_status[/b] sometimes sticks high and stays there until i power down down the chip. My guess is the state is changing during the [b]pause[/b] and the loop is exiting without setting [b]right_motor_a_status[/b] back to 0. Here is a [url=http://www.hellspark.com/dm/ebench/sx/dave/explorer.sxb]link[/url] to the complete code i'm currently mucking about with. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=177445 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)