Collapse All Expand All

PC-DMIS 2019 R1 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

  Value | Description
  --- | ---
  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

  Value | Description
  --- | ---
  PCD_EVENPARITY |
  PCD_MARKPARITY |
  PCD_NOPARITY |
  PCD_ODDPARITY |
  PCD_SPACEPARITY |

  Optional. Default is PCD_NOPARITY.
Data

  Value | Description
  --- | ---
  PCD_DATA7 |
  PCD_DATA8 |

  Data Bits. Optional. Default is PCD_DATA8.
stop

  Value | Description
  --- | ---
  PCD_ONE5STOPBITS |
  PCD_ONESTOPBIT |
  PCD_TWOSTOPBITS |

  Stop bits. Optional. Default is PCD_ONESTOPBIT.
flow

  Value | Description
  --- | ---
  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

OldBasic Object | OldBasic Members

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