Recently, I got helpful advice on how to install and register MSComm32.ocx for a serial communication project I am working on. I have succeeded in getting it on my home Windows XP machine where I write code, and a PC at work running Win' 98.
The work PC is actually hooked up to the serial device, a pump controller. Since then, I have established communication with the controller using Hyperterminal. The controller has its own serial protocol using ASCII characters. Commands from the PC begin with a 'start of text' character and end with a 'carriage return'. The controller responds with data, followed. The body of PC transmissions may have 1- or 2-letter commands, sometimes followed by numeric parameters.
Each MSComm control you use corresponds to one serial port. If you need to access more than one serial port in your application, you must use more than one MSComm control. The port address and interrupt address can be changed from the Windows Control Panel.
The controller resonds with an 'acknowledge' symbol, a 'negative acknowledge' symbol, or numeric data. Now that I am familiar with the controller protocol, I'm moving on to VBA code. I'm slowly working through a site,, a number of MicroSoft Knowledge Base articles, and code samples provided by Expert Exchange members, to get started writing actual subroutines. Perhaps someone can help me 'jump start' this part of the project with some simple code samples? For example, I'd like to ask the controller what setup program is assigned to pump drive 1, 'N1 and display the numeric response from the controller, '#', with the carriage return removed. I envision starting with something like, Private Sub Form_Load( ) With MSComm1.Settings = '9600,O,7,2' 'baud,parity,data bits,stop bits.CommPort = 1.PortOpen = True End With although I've also seen statements like, Open 'COM1:9600,n,7,2' For Input as #1 Is this equivalent to the previous 'With' statement? Also, the protocol says the use of handshaking when communicating with the controller is optional.
Get Smooth Fitness 7858-699 Cross-Trainer Ergometer Model 7858-699 Assembly Manual. Get all Smooth Fitness manuals! Smooth Fitness 7858-699: Cross-Trainer Ergometer Model 7858-699 Assembly Manual: Page 7. 128,000 Dominoes Falling into past a journey around the world 2 Guinness World Records) YouTub - Duration: 7:13. Ahmed Samir 81,434,141 views. Crane sports cross 7 ergometer manuals.
Should I ignore the Handshaking property, or set it to something? A little advice, up front, should help me get this coding started.
Osmodean, Thank you for your encouragement, but I still need an answer to my questions. Perhaps I should focus and even expand a little. Are the use of MSComm and the Open Comm statement equivalent? How does the Comm statement work? What would a sample subroutine using the Comm statement look like? How does one decide whether to use Xon/Xoff, RTS/CTS, or both for handshaking?
What is the default for the Handshaking property of the MSComm control? How do I actually send strings, adding ASCII characters like and (shown above)? How would I capture a character string, strip extra characters, and display it (would a message box or text box work best)? Some more specific discussion along these lines would be quite helpful. I need more specific advice.
I have bought Visual Basic.NET Standard Edition. Version 6 is no longer available at my local computer store. I have also installed an extra serial port in my CPU, to allow me to test transmissions and receptions. I had hoped that the available MSComm code for V5 and V6 could be more readily translated to.NET code. I am learning about differences between the various versions. Ideally, I'd like to get started with something that will work 'out of the box' for Excel VBA. Then I could use that as a basis to build upon.
Alternatively, code for VB.NET would be helpful. I've found a Knowledge Base article on using MSComm with VB.NET, so I'm working slowly through that. I'm also digesting the references given above. If anyone can give me more specific suggestions that will guide my study or otherwise speed up the process, I'd appreciate it.