How to swap a variable?


Results 1 to 6 of 6

Threaded View

  1. #5
    jessey's Avatar
    jessey Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mark_s View Post
    What happens if you read the temperature first right before the swap statement. The last sensor reading will now be in the temp variable. It can now be stored in Radiator_Temp or Block_temp. The way you have it now it reads the temperature to temp and exits the subroutine.
    Thanks Mark,

    That's all it took, I changed it like you suggested and it works perfectly now. Thanks for your help I really appreciate it.

    Thanks Again
    jessey

    Code:
       If I = 0 Then                 
        Sensor_Select = Radiator_Sensor   
        GOSUB Check_Temperature 
        Radiator_temp = temp  
       Endif    
     
       If I = 1 Then 
        Sensor_Select = Block_Sensor 
        GOSUB Check_Temperature
        Block_temp = temp 
       Endif
    Last edited by jessey; - 19th June 2010 at 03:48.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts