Download and save the file RS232Commands.OPK.
Then drag-and-drop this file onto the Origin interface. Two new files:
RS232Commands.c
RS232Commands.h
will be added to the \OriginC\OriginLab subfolder under your User Files Path.
Add the RS232Commands.c file to your Code Builder workspace and compile and build the file.
To make this file part of every Origin session, add it to the System subfolder of your Code Builder workspace.
Once the file is compiled, the following script commands will become available:
rs_open(portnum); // Open specified serial port for communication
rs_close(); // Close serial port currently in use
rs_config(param...) // Configure the serial port
rs_show_cfg; // Display current serial port configuration
rs_write(string); // Send string to serial port
rs_read(timeout, string); // Read from serial port in synchronous mode