SerialBrk (Break Signal to Communication Port)
The SerialBrk instruction is used to send a break signal with a specified duration to a serial port.
Syntax

In the following example, the SerialBrk instruction is used to wake up a sensor every minute. The sensor subsequently sends data back to the datalogger, which is received and stored by the SerialInRecord instruction.
Public InString As String * 100, NBytesReturned
BeginProg
'Open serial port, 9600 baud
SerialOpen (COMC1,9600,0,0,104)
Scan(5,Sec,0,0)
If IfTime (0,1,Min) Then
'send break to wake sensor
SerialBrk (COMC1,100)
'accept incoming string
SerialInRecord (COMC1,InString,0,100,13,NBytesReturned,01)
EndIf
NextScan
EndProg
Remarks
SerialBrk puts the TX line of a COMPort into a break condition for the specified Break time. This instruction runs in the processing task.
Parameters
ComPort (Communication Port)
Specifies the communication port to which the break will be sent.
Alphanumeric Code | Description |
---|---|
ComC1 | Datalogger's control ports 1 (TX) & 2 (RX) |
ComC3 | Datalogger's control ports 3 (TX) & 4 (RX) |
ComU1 | Universal terminal pair U1 (TX) & U2 (RX) |
ComU3 |
Universal terminal pair U3 (TX) & U4 (RX) |
ComU5 | Universal terminal pair U5 (TX) & U6 (RX) |
ComU7 | Universal terminal pair U7 (TX) & U8 (RX) |
ComU9 | Universal terminal pair U9 (TX) & U10 (RX) |
ComU11 | Universal terminal pair U11 (TX) & U12 (RX) |
Type: Constant
Break
The duration for the break in milliseconds.
Type: Variable or Constant