cdholding image

comm32 home
comm32 forum
buy comm32

Introduction
Install Comm32
Why Not MsComm?

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


Comm32 Properties
   .DeviceName
   .EOFChar
   .EvtChar
   .EvtCharEnable
   .OutPutEx
   .OutPutMode
   .ParallelEnable
   .TxTimeout

Comm32 Functions
   .getByte

   .GetPortStatus
   .InstalledDrivers
   .putByte
   .PortExists
   .ReadBytes
   .ReadString
   .WriteBytes
   .WriteString

OnComm Event
Hardware/Cables etc

SThreshold

Sets or Retrieves the minimum number of bytes in the transmit buffer below which an OnComm event is raised.

Available at design time and runtime.

MSComm32 and Comm32 have identical behavior

         Syntax object.SThreshold = value
 
  object Name of the communications control.
  value A numeric expression indicating the SThreshold number of bytes
 
  Example object.SThreshold = 0 '// No OnComm events will be raised.
       
    object.SThreshold = n '// During transmission an OnComm event will be raised
'// when less than n bytes remain in the transmit buffer.
       
    n = object.SThreshold '// Retrieves the current setting/value
       

Remarks:

If this value is set to a value larger than zero then the control will raise an OnComm (evSend) event when the number of bytes remaining in the transmit buffer falls below that number.

When using event driven communications you can program your application to fill up the transmit buffer and then continue with other processing while the data is sent by the Comm32 control in the background. Comm32 will raise an OnComm (evSend) event to tell you when less than this many bytes remain in the transmit buffer - you would respond to this event by using the Output property to queue more data into the transmit buffer.

Important: If removing MSComm32 from an existing project and replacing it with Comm32 remember that MSComm32 limited this property to a 32k “Short” Integer value. If using larger values you will of course remember to use variables of a larger data type to receive/process return values etc.

 
 

 

Copyright (c) 2010 Axis Controls Ltd