Vb6 turn off screenupdating
If anyone is interested I will publish the code that I use.
Richard Richard A pleasure Malforge, I once started down the MSCOMM route and found it quite beyond me !
I think if you are a professional programmer then it certainly offers everything that you ever could require. I only wanted to send an ASCII string of four characters to Com 1 and see what came back, but was immediately lost in the technicalities.
It will send or receive ASCII or binary information, configures the port for basic communications, and clears the port buffers, and that’s it!
The command set can be summarized in only a few lines: Open Comm Port(Serial_Port as String, Serial_Frame as String) as Boolean Close Comm Port()Get Num Bytes() as Integer Get String Data(Buffer as String, Numchars as Integer) as Integer Get Binary Data(Buffer as Byte array, Numbytes as Integer) as Integer Send String Data(Buffer as String) as Integer Send Binary Data(Buffer as Byte array) as Integer Send Sub Array(Buffer as Byte array, Num Bytes as Integer) as Integer Clear Comm Port()That’s all the functionality this control provides, but these few procedures can do a lot.
In this example I have created a form called Form1 and using TOOLS/Additional TOOLS have added the Cheapcom Object to the form. Close Comm Port 'close Comport End Sub I have written Hex to Decimal converters so that I can program in what the instrument expects to receive and let my converter look up the decimal code automatically. I have a small controller that takes ASCII commands to read some analog voltages.
You don't need to go further with the form as you will never see it displayed. I can get the port open, I can verify that the command was sent, I can see data on the input buffer, but I can't get it out. I get it.) So I'm not sure I'm using Get String Data or Get Binary Data the way they supposed to be.
Cheapcom is brilliant if you just want to do what they offer in the text I posted above. In my time today, I managed to figure out enough to put the Cheap Comm on a form, and call it as you show.
You have to remember that these objects only run from a form. My problem now seems to be something with the controller connected to the port, or Cheap Commm isn't written correctly.
Can anyone help with communicating to a COM port through Excel (on a machine that does not also have Visual Basic installed)?
I've tried downloading MSCOMM -- Excel recognizes the reference to MSComm32.ocx, but I get an error when trying to use it ("Run-time error '429': Active X component can't create object" ).
It is NOT meant for very sophisticated serial port operations.Tags: Adult Dating, affair dating, sex dating