OWIN not jumping to label


Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219

    Default OWIN not jumping to label

    I’m trying to get a OWOUTcommand to jump to a label when there is no sensor present. I have two ports on a 16F873a using 1-Wire to read DS2438 battery monitors. If there is no sensor present I want to jump to a label. I have verified that on an empty port, the master sends the reset pulse but there is no presents pulse. The program does not jump to a label as expected. On a port where there is a sensor the program works as it should. Am I setting up the command correctly to jump to a label if sensor is not present? There is no example of this in the manual. Comments Please! Thanks...
    Code:
      
    Sensor:
        OWOUT OWnet,1, [skiprom,WriteScratchpad,$00,$00],Senout
        OWOUT OWnet,1, [skiprom,ConvertT]    :pause 10
        OWOUT OWnet,1, [skipROM,ConvertV] :pause 5   
        OWOUT OWnet,1, [skipROM,RecallMemory, $00] ; Skip ROM search, Recall Memory
        OWOUT OWnet,1, [skipROM,ReadScratchpad, $00]   ; Skip ROM search, Read 
        OWIN    OWnet,2, [STR DSbuffer\9]' Read 9 bytes
        Serout2 TX_485, 84,[" 1-Wire is present on main"]
        GOSUB GetT_V
    Senout:
                    RETURN  
    ALT_Sensor:
        OWOUT OWalt,1, [skiprom,WriteScratchpad,$00,$00],Altout
        OWOUT OWalt,1, [skiprom,ConvertT] :pause 10
        OWOUT OWalt,1, [skipROM,ConvertV] :pause 5   
        OWOUT OWalt,1, [skipROM,RecallMemory, $00] 
        OWOUT OWalt,1, [skipROM,ReadScratchpad, $00] ' Skip ROM search, Read 
        OWIN  OWalt,2, [STR DSbuffer\9]' Read 9 bytes    
        Serout2 TX_485, 84,[" 1-Wire is present on Alternet"]
        GOSUB GetT_V
    Altout:
                   RETURN
    Last edited by MOUNTAIN747; - 15th March 2011 at 16:36. Reason: Label correction

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