PC-DMIS 2021.2 Object Library
OpenCommConnection Method
See Also  Send Topic Feedback | See Object Hierarchy Chart
port
The comm port to open. Required.
baud
The baud rate at which to communicate with the port. Optiona. Default is PCD_BAUD_9600.
parity
Optional. Default is PCD_NOPARITY.
Data
Data Bits. Optional. Default is PCD_DATA8.
stop
Stop bits. Optional. Default is PCD_ONESTOPBIT.
flow
Flow control. Optional. Default is PCD_RTSCTS.
PCDLRN ActiveX DLL > OldBasic Object : OpenCommConnection Method

Glossary Item Box

Description

Opens a connection to the specified comm port.

Syntax

Visual Basic
Public Function OpenCommConnection( _
   ByVal port As Long, _
   ByVal baud As PCDBAUD, _
   ByVal parity As PCDPARITY, _
   ByVal Data As PCDDATABITS, _
   ByVal stop As PCDSTOPBITS, _
   ByVal flow As PCDHANDSHAKE _
) As Long

Parameters

port
The comm port to open. Required.
baud
ValueDescription
PCD_BAUD_110 
PCD_BAUD_1200 
PCD_BAUD_128000 
PCD_BAUD_14400 
PCD_BAUD_19200 
PCD_BAUD_2400 
PCD_BAUD_256000 
PCD_BAUD_300 
PCD_BAUD_38400 
PCD_BAUD_4800 
PCD_BAUD_56000 
PCD_BAUD_600 
PCD_BAUD_9600 
The baud rate at which to communicate with the port. Optiona. Default is PCD_BAUD_9600.
parity
ValueDescription
PCD_EVENPARITY 
PCD_MARKPARITY 
PCD_NOPARITY 
PCD_ODDPARITY 
PCD_SPACEPARITY 
Optional. Default is PCD_NOPARITY.
Data
ValueDescription
PCD_DATA7 
PCD_DATA8 
Data Bits. Optional. Default is PCD_DATA8.
stop
ValueDescription
PCD_ONE5STOPBITS 
PCD_ONESTOPBIT 
PCD_TWOSTOPBITS 
Stop bits. Optional. Default is PCD_ONESTOPBIT.
flow
ValueDescription
PCD_DTRDSR 
PCD_RTSCTS 
PCD_XONXOFF 
Flow control. Optional. Default is PCD_RTSCTS.

Return Type

Long value. 0 if successful, -1 on error.

See Also

Copyright © 2021. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.