Table Of Contents

DAQ PlotPreferencesHardware ► Serial Port

The Serial Port Hardware preferences sets the state of the Serial Port Hardware. The following diagrams the Serial Port device preferences pane.

Serial Port

Upon launching DAQ Plot serial port devices show up in the Identification pop up button. Choose a device to enter it into the Identification text field, configure it using the appropriate fields and then click Apply.

A note about serial port enumeration (system detection): In general, serial port devices do not give notification to DAQ Plot when they are plugged in and unplugged. As a result, if you plug in a serial port device while DAQ Plot is running then DAQ Plot has no way of determining if that device is present. You must quit DAQ Plot, plug in your serial port device and then launch DAQ Plot. Likewise, if you disconnect the serial port device while DAQ Plot is running then DAQ Plot will not detect the disconnect, rather DAQ Plot will assume the device is generating an error or pause and try to acquire from it (harder). Either way DAQ Plot will appear to be hung because it is trying to acquire data from hardware that does not exist and, unlike USB device protocol, there is no system notification regarding the absence of the device. So, keep serial port devices plugged into your computer while acquiring data.

Serial Port device protocol is defined for each channel independently as: Write the Initialization string to the serial port then repeat the Acquire string in an acquisition loop. The data outputted as a result of the Acquire string is decoded using the Read Format string. For each acquired returned string there is a termination character which is a delimiter letting DAQ Plot know that the serial port device is done outputting data for a channel. Many times the termination character is an ASCII return character ('\r'), but it can be anything such as the octal value 0303. If the serial port device has no termination character (which may be a rare condition) then set the Termination Character field to be empty.

Use the backslash to escape characters in the command. The read format is the usual ANSI-C format specifier. All characters are optional except for the value format control string (which is %lf).

If a string is empty then it is not used during the acquisition. For example, if the Initialization string is blank then no initialization string is sent to the serial port device and instead the serial port device is presented with only the Acquire string.

Serial port preference attributes are defined in the following table. For values specific to your device consult the manufacturer's specification sheet. In practice, these attributes may not be sufficiently documented in which case trial and error can often produce satisfactory results.

Adjustable Serial Port Parameters

AttributeDefinition
Input SpeedThe serial port input speed. Legacy devices support 9600 (baud) but modern devices tend to support UARTS with speed of 115200.
Output SpeedThe serial port output speed. Legacy devices support 9600 (baud) but modern devices tend to support UARTS with speed of 115200.
Service TypeOne of Callout, Dialin or TTY.
Termination
Character
The character that delimits the end of output from the results of an Acquire command. The entry for the termination character can be an escaped character (such as \r) or it can be an octal code. An octal code begins with 0. For the Basic Hardware the termination character is 0303.
Parity TypeEither Odd or Even.
BitsEither 8 or 7.
ParityEither Enabled or Disabled.

In any event, use of the serial port preferences is contingent upon the parameters above being sufficient to manipulate the serial port device. The features above are attributes of a "model" of a typical serial port device used for data logging. If the model reflects the use of the (as of yet unknown) serial port device you are using then DAQ Plot is sufficient. However, if the model does not reflect the serial port device's specifications then DAQ Plot will not work and then DAQ Plot's internals need modification.


© Copyright 1993-2018 by VVimaging, Inc. (VVI); All Rights Reserved (Legal). Please email support@vvi.com with any comments you have concerning this documentation.