9/9/2019 Serial Port In Delphi 7
Delphi 7 XP prof UC310 USB/RS232 converter Hi I dont think that this problem is related to Delphi as such, but the basic problem is that if I open a port whilst a continuous flow of data is being supplied to it (in this case, a weighing machine at 9600,n,7,1 - a repeated simple sequence of ' 1.234 Kg CR+LF') sometimes the whole machine will reboot (I have tried two different machines, two different USB converters and two different Delphi components in my software ('comport and asyncpro'). There is a reboot due to data entering the PC via the USB converter if the port is opened or closed whilst data is being input. This is an intermittent problem and it must be due to some kind of internal buffer overflow. Note that this problem does not occur if the port is a standard PC serial port.
FabulaTech Technical Documentation - Serial Port Control SDK - Developer API - Integration. Environment - Borland Component Integration - Borland Delphi 7.
Asynchronous Serial Communication ActiveX, OCX and COM OLE components for rs-232, rs-422, rs-485. Serial Port I/O control with protocols ZMODEM, YMODEM, YMODEM-G, XMODEM, XMODEM-1K, KERMIT, MODBUS, 3964, RK512, LSV2. Supporting NET, C#, VB Net.
Serial Communication ActiveX and components for asynchronous rs-232, rs-422, rs-485 Supporting NET, C#, C-Sharp,VB Net. Protocols ZMODEM, YMODEM, YMODEM-G, XMODEM, KERMIT, MODBUS, 3964, RK512, LSV2. Access to high numbered COM ports as COM17, overcome error 8020, KB318784. MSComm In Binary Input Mode, replace PDQComm, SaxComm (?). Serial Communication ActiveX Control The SuperCom ActiveX (OLE/COM Control) for serial communications is a professional serial communication ActiveX that can be used to develop serial communication applications to control serial connections and attached serial devices (RS-232, RS-422, RS-485). The SuperCom ActiveX for serial communications supports common Windows development environment (IDE, Compiler) and provides the programmer with properties, methods and the events in order to develop serial data communication applications. The SuperCom ActiveX is also downwards compatible with the MSComm and compatible to PDQComm control and thus very easy to integrate into existing applications (see below how to replace with ease).
Using the SuperCom ActiveX for serial communications you easily write applications to control serial ports, Modem, Barcode Scanner, Scales, PLC, POS, serial medical devices, serial printer etc. Develop file transfer and file server application. With SuperCom the application can execute faster and smoother. Time is valuable. Developing communication software with the SuperCom serial communication ActiveX is extremely easy and starts by placing the ActiveX icon on a Windows Form.
The SuperCom ActiveX also provides that considerably speed-up the development process and produce fast, reliable solutions avoiding delaying or blocking of your application. No matter if data monitoring, receiving complex data packets or complex data transmission protocols, establishing connections or file transfer. It can run (without any special accord) optimized and transparently in background thus enabling the application to execute fast and smooth.
Communications Events Applications using the SuperCom ActiveX can work event driven. The SuperCom ActiveX reports the events OnComm, OnDataPacket, OnConnect and OnFileInfo. The reported events enable the application to manage other tasks simultaneously while communications or file transfer last.
The OnComm event reports when characters received, when communication errors occur, status lines e.g. CTS, DSR or RING change state, etc. The OnConnect event provides information during the setup of a connection (e.g. Modem dialup). The OnDataPacket event informs about the status of observed data packets for instance if an observed data packet is received. The OnFileInfo event provides status information during the file transfer.
![]()
A progress dialog and/or file transfer statistics can be updated. The OnPlug event observes PnP (Plug And Play) serial devices and the TCP/IP network.
Based on the used SuperCom software, it reports when serial devices plugged in or get unplugged, a network failure (e.g. Cable, hardware or software failure). Enhanced Communications Events The SuperCom Communications ActiveX reports more than 35 different communications events.
The enhanced event reporting mechanism in SuperCom ActiveX enables you to receive events on any defined character (e.g. EOF(26), STX, ACK, NAK, etc). Polling Mode The SuperCom ActiveX also supports the polling mode of operation. This means to obtain with methods and properties the state of the status lines and to check the data flow for communication errors without the need to react on events.
No matter which mode of operation the application is using, SuperCom will always perform serial data communication on multiple ports or connections simultaneously and in background. File Transfer High speed file transfers tasks are very easy to accomplish. The following widely used standard protocols ZMODEM, YMODEM/BATCH, YMODEM, YMODEM-G, XMODEM-1K, XMODEM/CRC, XMODEM, KERMIT and ASCII are included.
The SuperCom ZMODEM protocol includes important features like 'crash recovery', 32bit CRC and 'batch file transfer'. In fact, these protocols are running very stable since 1991. ActiveX Technology - ActiveX API It's the same ActiveX control shipped with other SuperCom packages too, like, etc. The runtime license, included with each packet, enables to control to perform serial port connections, TCP/IP, ISDN using one and the same component. One library, one API!
MSComm Compatible The SuperCom for Serial Communication ActiveX is compatible with the control and thus it's very easy to update existing applications using it. Replacing MSComm with SuperCom ActiveX is a fast and smooth operation. Summary Using the SuperCom ActiveX up to 255 ports / connections can be opened simultaneously within the same application. Start as many instances of your application - no limit set. Lengthy functions like file transfer, connecting, observing the data stream for special data packets or strings, and many other, are working in background while your application is performing other tasks. With SuperCom, Your application does not 'freeze' waiting on a lengthy function to complete. (The following briefly shows a simple example of the control operation using Visual Basic).
Visual Basic Sample Sub FormLoad ' Select COM2 SCom. CommPort = 2 ' is it available? PortPresent(SCom.CommID) SCOMPORTAVAILABLEREADY Then Exit Sub ' COM2 not available End If ' set comm params SCom. Settings = '115200,N,8,1' ' activate comm port SCom. PortOpen = True ' send data SCom.
Output = 'Hello World' ' receive data s = SCom. Input: ' close comm port SCom. PortOpen = False End Sub Private Sub SCom OnComm 'Event function Dim scEvent As Integer ' get the event code scEvent = SCom.
CommEvent If scEvent = SCOMMEVSEND Then ' or comEvSend ' all data sent, buffer is empty End If If scEvent = SCOMMEVRECEIVE Then ' or comEvReceive ' call SCom.Input to collect the received data. Call ReadChars End If If scEvent = SCOMMEVCHAR Then ' User defined special char received e.g. EOF (26), NAK, STX Call HandleSpecialData End If:: End Sub Private Sub SCom OnDataPacket(Action, Data) ' The parameter Action informs about the current status. ' The parameter Data delivers the captured data packet ' OK, data available If Action = SCOMMDATAPACKETOK Then sAction = 'DATAPACKET OK' ' failed but some captured data may be available If Action = SCOMMDATAPACKETNOK Then sAction = 'DATAPACKET NOK' ' error e.g.
![]()
Some property values provided was wrong ' check values of used 'DP.' Properties If Action = SCOMMDATAPACKETERR Then sAction = 'DATAPACKET ERR':: End Sub Private Sub SCom OnFileInfo(Action, Data) Select Case Action Case SCOMRXING S1 = 'RXING' Case SCOMTXING S1 = 'TXING' Case SCOMRXFIN S1 = 'RXFIN' Case SCOMTXFIN S1 = 'TXFIN' Case SCOMQUEUEFIN:: End Select End Sub Private Sub SCom OnConnect(Action, TimeLeft) If Action = SCOMCONNECTFAILED Then Debug.Print 'CONNECTFAILED' End If ' successfully If Action = SCOMCONNECTOK Then Debug.Print 'CONNECTED '; End If ' progress. If Action = SCOMCONNECTINFO Then Debug.Print '.' ; End If:: End Sub (Setup connection). Visual Basic Sample Private Sub SCom1 OnConnect(ByVal Action As Integer, ByVal TimeLeft As Long) If Action = SCOMCONNECTFAILED Then Form4.CTLINFO.Text = 'CONNECT FAILED' End If ' successfully If Action = SCOMCONNECTOK Then Form4.CTLINFO.Text = 'CONNECTED' End If ' progress.
If Action = SCOMCONNECTINFO Then Form4.CTLINFO.Text = 'CONNECT INFO.' End If End Sub:: SCom1. PortOpen=True ' setup a link SCom1. ConnectAddress= '555-1234' SCom1.
Connect=True ' now connect: See the same for. The connection setup runs completely in background. The application receives events about the progress. It does not matter which communication link it uses (Serial, TCP/IP or ISDN) it will require one common SuperCom API to use.
The learning curve is extremely low with SuperCom!. Simultaneously control up to 255 concurrent connections per application. Depending on product package, support for Serial (RS-232, RS-422, RS-485, TAPI) and (see also ). 100% buffered data transfer. Adjustable communication buffers (limited by RAM).
Text or Binary data transfer (any char between 0 and 255). Send and receive binary data. Send and receive hex strings.
Send and receive Unicode strings. Report the OnPlug event when serial device plugged in or unplugged or when the TCP/IP network changes state (SuperCom with Serial and/or TCP/IP support presumed).
It includes nearly all known standard file transfer protocols:, YMODEM/BATCH, YMODEM, YMODEM-G, XMODEM-1K, XMODEM/CRC, KERMIT.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |