Home > Archive > Electrical code Compliance > June 2005 > ASCII code to RS-232 to run induction bonding machine









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ASCII code to RS-232 to run induction bonding machine
ratedr1@aol.com

2005-06-17, 11:31 pm

I have a machine that uses induction to bond metals together. The
machine has a remote heat station that you set the wattage, and the
time, etc (with up and down buttons) and it will run on its own.
However, every time I need to bond different metals, thicknesses,
widths, etc... I need to reset the info and go through the whole
process again. The machine, has an rs-232 port on the back of it,
which will accept codes written in ascii that will send that pertinent
information to it. I would like some help (Im an ascii newbie) with
writing these programs, so that I can store all the metals,
thicknesses, etc in a laptop connected to this remote heat station, and
then I can have anyone run it so long as they can read.

Any help would be greatly appreciated
Scott
PLEASE email me at ratedr1@aol.com

mroberds@worldnet.att.net

2005-06-17, 11:31 pm

Followups to sci.engr.manufacturing.

In sci.engr.electrical.compliance ratedr1@aol.com wrote:
quote:

>The machine, has an rs-232 port on the back of it, which will accept
>codes written in ascii that will send that pertinent information to
>it. I would like some help (Im an ascii newbie) with writing these
>programs, so that I can store all the metals, thicknesses, etc in a
>laptop connected to this remote heat station, and then I can have
>anyone run it so long as they can read.


You might first check with the induction machine manufacturer to see if
they have software that does this already. Who knows, they might even
send it to you for free or for ten bucks or something. If they don't
have any software, or it's too expensive for you, read on.

First, you need to make sure there is a serial (RS-232) port on your
laptop. Most older laptops have one, but some newer ones don't. If you
don't have one, you'll need a USB-to-serial cable for around US$25 or
so.

Next, you need to connect the laptop to the heat station. If you're
lucky, one of two standard cables - a "straight through" or a "null
modem" - will work. If not, you'll have to make a cable or have one
made. The induction machine manual might mention what kind of cable you
need - if it doesn't, the next step should tell you if you have the
right cable or not.

Next, you need to test the connection. If you're using Windows, find
the Hyperterminal program, and set up a "Direct to COMx" connection.
x will vary depending on which serial port you're using; on most laptops
with a built-in serial port, it will be COM1, and on a USB-to-serial
cable, it will be a higher number, like COM5 (this should be displayed
when you install the software that comes with the cable). Set up the
other settings (bit rate, data bits, parity, stop bits, handshaking)
per the manual for the induction machine.

Look in the machine manual to see what the code format is like. "ASCII"
only specifies a certain pattern of bits for each number and letter; the
machine manufacturer has to specify which ASCII-encoded characters you
need in what order to set the machine. Assuming it's just plain text
(letters and numbers you can type on the keyboard), you can just type
the codes into the Hyperterminal screen, and then check to see that the
settings have changed on the machine (either on the machine's built-in
display, or by making a test bond). If you can't get the settings to
change on the machine, you typed in the codes wrong, the settings in
Hyperterminal (bit rate, data bits, parity, stop bits, handshaking)
are wrong, or the cable is wrong.

Once you find the right combination of settings and cable, write down
what the Hyperterminal settings are. Then, use Notepad (_not_ Wordpad
or Word) to create plain text documents with the same codes that you
were typing into Hyperterminal. Create one document for each set of
settings you need, and save it with a descriptive file name so you can
remember what it's for (for instance, 1000w-30s.txt for 1000 watts for
30 seconds.) Then, use Notepad again to create "batch files" to copy
these text files to the serial port. These should all be in the same
directory as the text files you made earlier. Each batch file will
have two lines in it, something like this:

mode com1: 9600,8,n,1,dtr=off,dsr=off
copy 1000w-30s.txt com1:

The first line sets up the serial port. The above is only an example;
you'll have to substitute the parameters you found to work in
Hyperterminal. In a DOS window, type in

mode com1: /help

to see what all the possible settings are. The second line copies the
text file with the settings to the induction machine. You might name
the batch files according to the metals they are good for, like
gold-14kt-0.2.bat, for 0.2" of 14 karat gold. The .bat extension is
important.

Next, you can create shortcuts on the Windows desktop to each batch
file. You can leave the shortcut names the same as the batch file names
(gold-14kt-0.2), or use more descriptive words (14 karat gold, 2/10
thick). When someone double-clicks on the shortcut, the associated
batch file will run - it will first set up the serial port, then copy
the file of settings to the induction machine.

There are other ways to do this. Instead of text files and batch files,
it is possible to write a program that would present a nicer user
interface with buttons and boxes and so on. This may even be
preferable, depending on the skill level of the user. However, the
method with text files and batch files will work on _any_ PC running
Windows. If the computer you're going to use with the induction machine
isn't going to be connected to a network, this is a really good place
for an old clunker running Windows 95.

You may want to enlist the aid of a local computer geek. If the
induction machine code format isn't too weird, this would be, in my
opinion, a 2 day project at the most.

I hope this helps!
quote:

>PLEASE email me at ratedr1@aol.com


Ask a question on Usenet, get an answer on Usenet.

Matt Roberds

LinkBot





Other archives available: Cellular phones topics archive | Web Design forum archive | Software help archive | Hardware reviews archive | Programming topics archive

Copyright 2004 - 2008 homeownerschat.com