WaitMem Method

Description
Waits for a memory bit status to change.

Syntax
Sub WaitMem (BitNumber As Integer, Condition As Boolean, Timeout As Single)
Sub WaitMem (Label As String, Condition As Boolean, Timeout As Single)

Parameters

  • BitNumber
    An integer expression indicating the memory bit number.
  • Label
    A character string indicating the memory bit label.
  • Condition
    A Boolean expression indicating the memory bit state.
  • Timeout
    Maximum wait time (s)

Remarks
You should always check if a time out occurred by using the TW method. See the example below.

See Also
WaitSw Method

WaitMem Example
VB Example:

' Wait for memory bit 1 to be 1 (True)  
' Max time is 5 seconds  
m_spel.WaitMem(1, True, 5)  
' Did WaitMem time out?  
If m_spel.TW() Then  
    MsgBox "memory bit time out occurred"  
End If  

C# Example:

// Wait for memory bit 1 to be 1 (True)  
// Max time is 5 seconds  
m_spel.WaitMem(1, True, 5);  
// Did WaitMem time out?  
if (m_spel.TW())  
    MessageBox.Show("memory bit time out occurred”);