![]() ![]() ![]() For example, a timer can be used to poll the serial port using GetNumBytes(). That’s all the functionality this control provides, but these few procedures can do a lot. SendSubArray(Buffer as Byte array, NumBytes as Integer) as Integer SendBinaryData(Buffer as Byte array) as Integer SendStringData(Buffer as String) as Integer GetBinaryData(Buffer as Byte array, Numbytes as Integer) as Integer GetStringData(Buffer as String, Numchars as Integer) as Integer OpenCommPort(Serial_Port as String, Serial_Frame as String) as Boolean The command set can be summarized in only a few lines: It will send or receive ASCII or binary information, configures the port for basic communications, and clears the port buffers, and that’s it! To this end, CheapComm only exposes the most basic operations of the serial port. It is NOT meant for very sophisticated serial port operations. ![]() This control can be used with any language that works with OLE controls (OCX controls).ĬheapComm is a means of using the serial port for instrument control. This control has also been used with to control other serial port devices. ***********************************************************ĬheapComm was written to permit Visual Basic, Excel, and VBA (Visual Basic for Applications) users to use the Photon Technology International (PTI) serial port devices without requiring purchase of the professional version of Visual Basic (that comes with MSCOMM32, a decent serial port OCX), or an expensive serial port DLL that provides many more features than the SIDs require. It is possible to use any Serial Com Port with both ASCII and Hexadecimal. I have written a standard Excel book that contains a sheet with all the settings, Baud, Parity, etc., and I just tailor this to suit the application that I am writing. It has an installer that installs the DLL and a simple set of commands for performing the various COM operations. I use a simple solution called Cheapcom which is as far as I am aware Freeware. Playing with MSCOMM is definitely not for the fainthearted. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |