cdholding image

comm64 home
comm64 download
comm64 forum
buy comm64

Introduction
Install Comm64
Why Not MsComm?

Properties
   .Break
   .CDHolding
   .CommEvent
   .CommPort
   .CTSHolding
   .DSRHolding
   .DTREnable
   .EOFEnable
   .Handshaking
   .InBufferCount
   .InBufferSize
   .Input
   .InputLen
   .NullDiscard
   .OutBufferCount
   .OutBufferSize
   .OutPut
   .ParityReplace
   .PortOpen
   .RThreshold
   .RTSEnable
   .Settings
   .STHreshold


Comm64 Properties
   .RxTimeout
   .TxTimeout

Comm64 Functions
   .readBytes
   .readString

   .writeBytes
   .writeString
   .PortExists

OnComm Event

Hardware/Cables etc
Loopback test plug

CommEvent

Retrieves a numerical event code indicating the most recent communications event or error.

Not Available at Design time. Read Only at RunTime

MSComm32 and Comm64 have the same behavior.

  Syntax value = object.CommEvent
     
  object Name of the communications control.
  value A numeric expression containing the numeric event code being one of the following
       
    1 = comEvSend
There are fewer than Sthreshold number of characters in the transmit buffer.
    2 = comEvReceive
There are more than Rthreshold number of characters in the receive buffer.
    3 = comEvCTS
Change in Clear To Send line.
 
    4 = comEvDSR
Change in Data Set Ready line. This event is only fired when DSR changes from 1 to 0.
    5 = comEvCD
Change in Carrier Detect line.
 
         6 = comEvRing
Ring detected. Some hardware may not support this event.
    7 = comEvEOF
End Of File character received.
 
       
     
    1001 = comEventBreak
A Break signal was received.
 
    1002 = comEventFrame
The hardware detected a framing error.
 
    1006 = comEventOverrun
The hardware could not receive data fast enough and some was lost
    1007 = comEvEOF
End Of File character received.
 
    1008 = comEventRxOver
Receive Buffer Overflow. There is no room in the receive buffer. Some data was lost
    1009 = comEventRxParity
Parity Error. The hardware detected a parity error.
    1010 = comEventTxFull
Transmit Buffer Full. The transmit buffer was full while trying to queue a character.
    1011 = comEventDCB
An error occurred while setting up the Windows Com driver.
          Example  
 

If object.CommEvent > 1000 then
      MessageBox.Show ("A communications ERROR occurred")
End If

   

Remarks:

When using Event driven communications you would generally respond to the OnComm event and then interrogate the CommEvent property to decide what the cause of the OnComm event was. (The CommEvent property contains the code/reason for the raising of the OnComm event)

 

 

 
Copyright (c) 2010 Axis Controls Ltd