Collapse
CollapsingX
  • - or -

SerialPort steps overview


The SerialPort steps allows your runtime platform to exchange information with external devices, such as motion or light controllers, that are connected via a serial port.

The SerialPortSetup step is used to set the data transfer speed and communication options (data bits, parity, and stop bits) for your runtime platform. This step must be configured before using the SerialPortReader step or the SerialPortWriter step and is usually before the main loop.

The SerialPortWriter step writes to the serial port of your runtime platform and allows you to receive an acknowledgment string from an external device that confirms the write was received.

The SerialPortReader step reads from the serial port of your runtime platform and returns all the characters found in the input buffer. The length of the read is dependent on a user-defined termination condition; you can set the number of characters to be read or specify a text which, when read, will terminate the current read.

For a diagram illustrating data flow for camera, triggered, and I/O operations, see the Acquisition overview section in Chapter 28: Acquisition.

Multiple COM ports

If your runtime platform supports more than one COM port and you need to use them, you must add the COM ports in the Serial Ports screen of the Platform Configuration dialog. This is accessible using the Configure Serial Port button found in the Configuration pane of any Serial Port step, or using the Project Configure platform menu item. Once on this screen, you can add, remove, configure or rename COM ports. When configuring a port in this dialog, you typically give a meaningful name to a serial port and specify which COM port it maps to. Each Serial Port step you use must specify which serial port the step applies to.