| Author |  | 
      
        | phil13 Groupie
 
  
  
 Joined: December 19 2004
 Location: France
 Online Status: Offline
 Posts: 60
 | 
          Hi,
           | Posted: June 07 2005 at 11:59 | IP Logged |   |  
           | 
 |  
 I would like to send a command on a serial port and then powerhome :
 
 - call a macro "macro1" if something is received on the port (no problem for that, it is defined in ph_comopen)
 
 - call a macro "macro2" if nothing is received in a
 amount of time (2 secondes for example).
 
 what is the best way to do that ?
 
 Philippe
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          How about...
           | Posted: June 07 2005 at 20:03 | IP Logged |   |  
           | 
 |  
 macro1:
 ph_killmacrowait("macro1")
 handle comm stuff
 wait 2
 run macro2
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Philippe,
           | Posted: June 10 2005 at 15:52 | IP Logged |   |  
           | 
 |  
 I think Tony's got it.  I would do something very similar like:
 
 Send the COM command
 Call Macro 2
 
 Macro1:
 ph_killmacrowait("macro2")
 handle macro 1 comm stuff
 
 Macro2:
 Wait 2
 Handle no comm stuff
 
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  |