MSComm in VB.NET and Stepper Motor Serial Control

C

Carl Gilbert

Hi
I'm trying to open a vb6 project in vb.net which uses the mscomm component.
When running the vb upgrade wizard in vb.net, an error is raised:

Upgrade failed, unable to load reerenced component
mscomm32.ocx (1.1.0)
You need to install this component before you upgrade the project.

Does anyone know how to install the mscomm component.

For a download of the project I am trying to upgrade follow the link below,
MSComm Exa.

http://www.developerfusion.com/show/371/

Its just a program to send data to a PCB via the serial port which is my
primary problem.
The PCB controls a stepper motor, http://www.milinst.com/gemodules/5_595.pdf
which says something about sending data like:

+500 20<return> (which should move 500 with 20 millisecond gaps)

Using your PC's Terminal (or HyperTerminal) program. So if anyone know more
about that subject, it woud be greatly apreciated.

Regards, Carl Gilbert
 
M

mindspringnews

As I understand it this component is included with VB6 pro and enterprise
additions and is best way to handle serial ports. Does not come in VB6
standard. You are sending out a formatted string of characters that the
controller understands. With instruments this is a 2 way street most the
time, and you need to know the formatting and the language of the device.
 
J

John Larkin

Hi
I'm trying to open a vb6 project in vb.net which uses the mscomm component.
When running the vb upgrade wizard in vb.net, an error is raised:

Upgrade failed, unable to load reerenced component
mscomm32.ocx (1.1.0)
You need to install this component before you upgrade the project.

Does anyone know how to install the mscomm component.

For a download of the project I am trying to upgrade follow the link below,
MSComm Exa.

http://www.developerfusion.com/show/371/

Its just a program to send data to a PCB via the serial port which is my
primary problem.
The PCB controls a stepper motor, http://www.milinst.com/gemodules/5_595.pdf
which says something about sending data like:

+500 20<return> (which should move 500 with 20 millisecond gaps)

Using your PC's Terminal (or HyperTerminal) program. So if anyone know more
about that subject, it woud be greatly apreciated.

Regards, Carl Gilbert

Microsoft continues to make simple stuff harder and harder to do. Once
upon a time, ordinary mortals could write simple, understandable
programs that did useful stuff fast.

John
 
J

Jamie

save your self some head akes and use C++ or Pascal( delphi)..
in any case ...
you are over looking the simple point.
COMPORTS are seen like file io..
this means you open then as a text file. :)
the file name for example for COM1 is
"COM1:"
:)
open 2 files one for write only and one for read only if you
need 2 way linking..
start a secondary thread and to some input reading on the input
file.. when you receive some charactors store them some where.
etc..
 
G

GrahamH

Carl Gilbert said:
Hi
I'm trying to open a vb6 project in vb.net which uses the mscomm component.
When running the vb upgrade wizard in vb.net, an error is raised:

Upgrade failed, unable to load reerenced component
mscomm32.ocx (1.1.0)
You need to install this component before you upgrade the project.

Does anyone know how to install the mscomm component.
http://www.yes-tele.com/mscomm.html
regsvr32 (path)\mscomm32.ocx
 
T

The Real Andy

GrahamH said:

That won't actually work. The ocx needs to be wrapped up for use with .net.
Fortunately, this is quite easy to do, just use AxImp.Exe mscomm32.ocx. Then
its as simple as adding a reference in your project.

Using AxImp will also take care of the licensing issues with the MSComm OCX.
 
K

Ken Halter

For the record, you're crossposting to a group that has nothing to do with VB.Net. If
"dotnet" isn't in the name, it's not a VB.Net group. Not on the MS servers anyway.
microsoft.public.vb.controls is a VB6 group.
 
D

Dick Grier

Hi,

Perhaps the easiest solution is to download NETcomm.ocx from my homepage.
Add it to your toolbox, and drop it on the form. Then, change a few lines
of the code that would have used MSComm (use InputData instead of Input).

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top