dbTalk Databases Forums  

HyperTerminal Control

comp.databases.ms-access comp.databases.ms-access


Discuss HyperTerminal Control in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lou O
 
Posts: n/a

Default HyperTerminal Control - 09-08-2010 , 10:27 PM






Does anyone have any experience passing commands to the HyperTerminal
window from Access code.
Let me explain a bit further.
I am trying to automate the process of using size data from a cutting
list to operate a servo controlled length gauge at a cut off saw.
The length gauge accepts simple commands (cutting sizes) typed into
the HyperTerminal window of a PC.
(The PC is connected to the length gauge with a serial cable.)
These typed commands in the HyperTerminal window move the gauge stop
to the entered sizes.
i.e. the command m24<cr> moves the gauge stop to 24 inches.

I produce a cutting list of sizes that I want to pass to the
HyperTerminal window through code thereby automating the data entry
into HyperTerminal window.
It seems that I need to pass the correct keystrokes to the
HyperTerminal window and make HyperTerminal process the command, but
how?
I hope I haven't been too unclear and that someone can point me to a
solution for this.

Thanks
Lou

Reply With Quote
  #2  
Old   
Salad
 
Posts: n/a

Default Re: HyperTerminal Control - 09-09-2010 , 03:04 AM






Lou O wrote:

Quote:
Does anyone have any experience passing commands to the HyperTerminal
window from Access code.
Let me explain a bit further.
I am trying to automate the process of using size data from a cutting
list to operate a servo controlled length gauge at a cut off saw.
The length gauge accepts simple commands (cutting sizes) typed into
the HyperTerminal window of a PC.
(The PC is connected to the length gauge with a serial cable.)
These typed commands in the HyperTerminal window move the gauge stop
to the entered sizes.
i.e. the command m24<cr> moves the gauge stop to 24 inches.

I produce a cutting list of sizes that I want to pass to the
HyperTerminal window through code thereby automating the data entry
into HyperTerminal window.
It seems that I need to pass the correct keystrokes to the
HyperTerminal window and make HyperTerminal process the command, but
how?
I hope I haven't been too unclear and that someone can point me to a
solution for this.

Thanks
Lou
Just tossing some stuff out.

A tutorial on HyperTerminal
http://www.developershome.com/sms/ho...erTerminal.asp

Some vba stuff
http://www.xtremevbtalk.com/archive/.../t-195130.html

The above link has a link in one of the responses. Try this one. Since
it is a commercial product you might want to call and see if it does
what you want.
http://www.hilgraeve.com/

Something on VBA and Hyperterminal. Seems you'd want to use ActiveX
MSCOMM1.
http://www.canbal.com/view.php?sessi...QlLTcq8wfQY%3D

More discussion
http://www.control.com/1026207701/index_html

Anyway, google for help on MSCOMM1

Reply With Quote
  #3  
Old   
The Frog
 
Posts: n/a

Default Re: HyperTerminal Control - 09-09-2010 , 04:19 AM



Hi Lou,

I think SALAD is on the right track here. I am going to try and take
this a step further, assuming I am understanding your needs correctly.
Here we go:

Rather than try and use Hyperterminal at all, why not just have Access
talk directly to the device via the serial port? I am assuming that if
you can talk to it via Hyperterminal then you should know the port
settings required. You seem to also know the commands required to
control the device. My thinking is this:

1/ Use Access to 'control' a serial port
2/ Have a table in your database that has your commands (what you type
into HyperTerminal) as well as any human readable descriptions
required to choose them (if necessary), and of course some form of
primary key.
3/ Your 'process' in Access can then simply 'choose' which command is
necessary, look up the command code from the table, and send the
commmand directly via the serial port.

You dont say whether or not the device provides any feedback, but if
it does you could also build a table with the feedback responses and
what they mean to provide feedback to the user.

I would want to avoid the use of HyperTerminal if I could and use the
serial port directly. There is an excellent book on this, but I cant
for the life of me remember the name of it right now. I do remember
however that there is a user on the visual basic usenet group (not
the .net one) that actually wrote the book! There should be plenty of
posts there to give you what you need.

Cheers

The Frog

Reply With Quote
  #4  
Old   
The Frog
 
Posts: n/a

Default Re: HyperTerminal Control - 09-10-2010 , 05:03 AM



Glad to be of help guys.

I used to have a class module years ago that was very similar to this
one for comIO. I used it a lot when dealing with embedded hardware.
Buggered if I can find it though, but I will keep looking. It was a
really battle hardened one that had been well developed and tested by
some of the engineers I worked with. I learned a lot from that. It had
a rather lovely event structure to it that made it extremely flexible.
I will check it off against the one posted above and the Windows API
calls to see if the Multiplier / Constant setting is an issue. Might
have some hardware to test it against too.....have to go through the
garage boxes. I'm getting excited now....is that wrong? :-#

Cheers

The Frog

Reply With Quote
  #5  
Old   
Lou O
 
Posts: n/a

Default Re: HyperTerminal Control - 09-10-2010 , 07:15 AM



On Sep 10, 6:03*am, The Frog <mr.frog.to.... (AT) googlemail (DOT) com> wrote:
Quote:
Glad to be of help guys.

I used to have a class module years ago that was very similar to this
one for comIO. I used it a lot when dealing with embedded hardware.
Buggered if I can find it though, but I will keep looking. It was a
really battle hardened one that had been well developed and tested by
some of the engineers I worked with. I learned a lot from that. It had
a rather lovely event structure to it that made it extremely flexible.
I will check it off against the one posted above and the Windows API
calls to see if the Multiplier / Constant setting is an issue. Might
have some hardware to test it against too.....have to go through the
garage boxes. I'm getting excited now....is that wrong? :-#

Cheers

The Frog
I amended the code as Stuart suggested.
It didn't seem to affect the outcome.
Curious to see what you come up with digging around in your garage
though.....

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.