Primer for RS232TTY
Primer for RS232TTY
Primer for RS232TTY
Primer for RS232TTY
Primer for RS232TTY
Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY
Primer for RS232TTY Primer for RS232TTY
Primer for RS232TTY
Go Back  Xtreme Visual Basic Talk > > > Primer for RS232TTY


Reply
 
Thread Tools Display Modes
  #1  
Old 02-27-2012, 04:01 PM
Gruff's Avatar
GruffPrimer for RS232TTY Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default Primer for RS232TTY


Hi Gang,

I've a new project that was dumped in my lap about 10 minutes ago.

We recently purchased a couple of sets of Wireless Serial Adapters for our machine shop PC to CNC communications. We have two CNCs.
They use bluetooth after the serial port.

Initially we were told these devices were plug and play. They are not.
We were also told we could broadcast from one to many. You cannot.

Basically we are stuck having to run a terminal program and manually type in cryptic commands at a Dos prompt to switch from sending to one CNC or the other. It is a pain for the machinist to have to type commands over and over all day.

I've been asked to automate it somehow.

I know next to nothing about terminal communication. Is this something I can write without too much effort?

The Terminal program is called RS232TTY.exe.

What are my options?

P.S.
Currently we Launch the program with baud rate and serial port on the command line
"RS232TTY -b4800 Com1"
Inside the running program we have to quickly type "<<<" until we get an OK response. (This disconnects the existing linked bluetooth device)
then. "Connect=<BlueTooth ID Number>" Wait for OK again.
Press F10 to exit the utility.
__________________
Burn the land and boil the sea
You can't take the sky from me


~T

Last edited by Gruff; 02-27-2012 at 04:20 PM.
Reply With Quote
  #2  
Old 02-28-2012, 08:27 PM
mkaras's Avatar
mkarasPrimer for RS232TTY mkaras is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Mar 2004
Location: Beaverton, OR
Posts: 1,874
Default

This sounds like it just needs to be a COM port number that you open from your program and interface with the SerialPort class. Should be no need to think in terms of a full "Terminal" program just to send some simple strings and get back a response or two.

Michael Karas
Reply With Quote
  #3  
Old 02-29-2012, 11:16 AM
Gruff's Avatar
GruffPrimer for RS232TTY Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

Thanks MK,

I knocked out a simple terminal program after reading several tutorials.
I am able to send and receive text.

What I get doesn't make much sense and the original commands do not clear or set the bluetooth ports.

My problem is the commands used in the terminal program downloaded from the manufacturers web site do not seem to work with my terminal program.

Do these sort of programs alias the commands you enter so you cannot see the actual command sent?
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
  #4  
Old 02-29-2012, 12:38 PM
DrPunk's Avatar
DrPunkPrimer for RS232TTY DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

I created a sort of comm sniffing program a while back. It requires the computer has 3 comm ports and you also need a cross over serial cable so it might be useless to you. But say you have a comm port on the PC (COM1) and two USB comm port adapters (COM3 and COM4) then you'd hook the comm port that one program uses to talk to whatever (say COM1) with COM3, using the cross over cable, and then connect COM4 to the device that the program is talking to. My program sees what's going out of COM1, records it and forwards it onto COM4. Any response from COM4 is then recorded and passed onto COM1.

You're more than welcome to have a copy of it if you want. I don't think I've got a copy on me now but I should be able to find it tomorrow.
__________________
There are no computers in heaven!
Reply With Quote
  #5  
Old 02-29-2012, 04:55 PM
Gruff's Avatar
GruffPrimer for RS232TTY Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

Bless you sir, I wouid definitely love to see it.

We only have one DB9 Com port on any of our 70 odd PC's and no USB to Serial adapters.
By CrossOver Cable do you mean a null modem cable? Nope havn't got one of those either.

As a temporary workaround I have ordered a DB-9 A-B box and we can tie that to the single Com port on the PC. Put a bluetooth serial adapter on A and B and link them to each CNC respectively. This puts us back to the same cabled system we had before minus the cables.

I would love to figure a programming solution in any case.
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
  #6  
Old 03-01-2012, 03:14 AM
DrPunk's Avatar
DrPunkPrimer for RS232TTY DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

Hopefully I've attached it correctly.
Attached Files
File Type: zip FMLCommThrough.zip (74.8 KB, 2 views)
__________________
There are no computers in heaven!
Reply With Quote
  #7  
Old 03-03-2012, 11:03 AM
passel's Avatar
passelPrimer for RS232TTY passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,026
Default

As a sanity check, I think I would run hyper-terminal, under Start-Accessories-Communications (I think that's the menu path, as I'm on a Windows 7 machine at the moment, and they removed hyper-terminal).
Have it connect to Com1 at 4800 baud and see if typing the commands there work the same as using the DOS application.
If not, then perhaps there is something "hinky" going on, and you will need to have multiple ports available to capture the data.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #8  
Old 03-03-2012, 02:33 PM
surfR2911 surfR2911 is offline
Contributor
 
Join Date: Oct 2009
Posts: 719
Default HyperTerminal and alternatives under Windows7

If you are running Windows7, you might be wondering what Microsoft recommends as a replacement/alternative to HyperTerminal.

In the Microsoft article:
What happened to HyperTerminal?...they talk about using WinRS (Windows Remote Shell - type "winrs /?" at the command line) or "Phone and Modem" under Control panel.

These two alternatives are also mentioned in the non-Microsoft article:
HyperTerminal Alternatives for Windows 7..but the article also goes on to mention alternatives that implement SSH under Windows like like TeraTerm and Putty.

However they also mention at the bottom of the article:
Quote:
If you just can’t live without the original HyperTerminal in Windows XP, you can actually extract two files from your XP installation and copy them over to Windows 7 or Vista.

The two files you will need are hypertrm.dll and hypertrm.exe. Simply copy those files into any directory on your machine and it will work. You should be able to find hypertrm.exe in C:\Program Files\Windows NT and hypertrm.dll in C:\Windows\System32.

If you have the Windows XP CD, you should be able to find both of these files in the i386 directory on the CD.
Reply With Quote
  #9  
Old 03-04-2012, 01:34 PM
Gruff's Avatar
GruffPrimer for RS232TTY Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

Thanks for the idea Passel. Will get on it Monday.

We are running WinXP on the machine shop PC, but thank you for the link.
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
  #10  
Old 03-14-2012, 08:31 AM
Gruff's Avatar
GruffPrimer for RS232TTY Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

Did the sanity check with hyper-terminal. Same problem so their program must be sending something else under the hood.

Note: I had to purchase two 25 to 9 pin double male adapters since the CNC's use 25 Pin DSubs.

My 9 pin DSub A-B box and single cable came in. Attached the cable from the PC Com port to the A-B box. Attached Two wireless serial port adapters directly to the A-B box output. Synced them with their counter parts on the two CNC's. Works perfectly and avoids the glitches we were experiencing with their software.

The PC can now be up to 300 feet from the CNC's with no cables. Very Cool.

See pics

BTW this is the product we are using. $160.00 a pair. There are many others... probably better than what we ended up with.
Attached Images
File Type: jpg CNC Wireless Serial Adapter.jpg (31.6 KB, 5 views)
File Type: jpg A-B box wireless serial adapter.jpg (39.8 KB, 5 views)
__________________
Burn the land and boil the sea
You can't take the sky from me


~T

Last edited by Gruff; 03-14-2012 at 10:27 AM.
Reply With Quote
  #11  
Old 03-14-2012, 11:18 AM
passel's Avatar
passelPrimer for RS232TTY passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,026
Default

But are you still having to type cryptic commands at the command prompt, which I thought was the main issue you had to solve?
Or was the cryptic part what you had to do to switch between machines, and now you can just mechanically switch with the A/B switch so avoid the cryptic part?
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #12  
Old 03-14-2012, 11:56 AM
Gruff's Avatar
GruffPrimer for RS232TTY Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

The latter. The main thrust was to get the Machine shop up and running wirelessly by any means possible.

The Wireless adapter company software was not 100%. It could fail to switch between bluetooth adapters, requiring you manually unplug the adpater at the CNC, power it off, power it on, plug it back in, Etc... By which time you could have sneakered a floppy to the CNC.

The hardware solution is fixed and reliable.

The Wireless Adapter company says they are coming out with new software with a windows interface that is suppose to be better. If so I do not need to write my own solution. Worst case we can still use the A-B box hardware solution.
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Primer for RS232TTY
Primer for RS232TTY
Primer for RS232TTY Primer for RS232TTY
Primer for RS232TTY
Primer for RS232TTY
Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY Primer for RS232TTY
Primer for RS232TTY
Primer for RS232TTY
 
Primer for RS232TTY
Primer for RS232TTY
 
-->