General discussion


rs232 to DOS prgm on win98 to cnc mach.

By sgt_shultz ·
my cust is reporting poor 'upload' speeds when they send cnc programs via rs232 from a win98 box running a dos based cam program in a windows dos shell (no dos mode. win98 se all patches.
we used the sample pif for msdos mode games to take a swing at a autoexec and config.sys file which we used both in the root menu of c and also tried it in the advanced dos mode config settings in the pif for the cam program. dos mode seems to work well but non dos mode seems to choke up and slow down...
they think it is working great in ms-dos mode. meaning fast serial like they expect. we need to test more to see, but that is how it is looking right now.
if we run the program in a dos shell or whatever you get when you make a shortcut to dos executable, comm seems to work but slowly.
the settings in the cam program appear to be 4800, 7,n,1 even, xon xoff. nothing has changed on the nc's. we have changed the com settings in device manager to match.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by sgt_shultz In reply to rs232 to DOS prgm on win9 ...

they guys on the nc's say they usually can watch the data flow in rapidly but now they see it come in fast at first then slow to few chars at a time.
do we have a nc out back with baud set too low? or something? how does xon xoff work? wouldn't you expect it to be hardware handshake not xon xoff. they guys in the shop tell me they don't change settings in windows there ever. only sometimes in 'machine' mode. this is my first crack at cnc support and i am now off site 1500 miles away and we are workign this by phone...
we'd rather be in windows because the form virus is how i got the chance to work on it at all. they love how norton's won't let them use an infected floppy...and i dispair at supporting antivirus in dos mode unless you guys can help me out there...
to elaborate some this is old DOS based cam prog they use to draw a part and make a cnc program to machine it. 'Americam'. then another part of the dos program 'uploads' it via rs232 to the cnc.
using poor judgement, we plotted to replace the aging dos machine with a new win98 box. (yes, it wasn't broke. and i fixed it anyway. sigh.) i plopped the old dos hd into a win98 box the bad judgement part is i did this at 11pm night before i flew back home 1500 miles away. all i did was verify the cam program would start. since i did not know how to test the serial comm anyhow w/o my cust shop foreman who was enjoying a rare sunday off.
if this is too incoherent i will try to repost later more clearly.
any thoughts?
there was no com config stuff in old autoexec.bat or config.sys. only thing in there was an emm statement to exclude video and a mouse driver as far as i can recall...
wonder if it is protocol because would the other settings being wrong just not work at all or yield corruption, yes?
could this be just 'overdriving' the cnc? i asked them to check baud on each machine. i know i have one 4800 and one 2400 out there... if we set windows down to 2400 do you think that might clear it up?

Collapse -

by dryflies In reply to rs232 to DOS prgm on win9 ...

Taking a crack at this, I would say that your computer is overrunning the serial port. xon xoff is a protocol where the DCE (Data Communications Equipment -- the CNC) sends an XOFF character to the DTE (Data Terminal Equipment - the PC) when its buffer is full to make the DTE stop sending data. when the buffer is sufficiently empty, the DCE sends an XON character telling the DTE to resume transmition. There are any number of things that could be causing your problem, not the least of which is a poor ground between the two pieces. also, some newer serial ports fudge on the voltage levels to lower power consuption. The end result of the combination is that you have to be extra careful about your signals and grounds. Also, in a manufacturing environment, electrical noise runs rampant and is often the cause of trouble. this is exacerbated by grounding issues and marginal signal levels. when you swapped out the PC, were the connectors for the serial cable bright or oxidized? Also, try going into the BIOS and adding waits into the processor (can you still do that?) the other thing is in non-dos mode, the PC might be missing some of the handshaking characters or feedback from the machine.


Collapse -

by sgt_shultz In reply to

thank you. fantastic info. i will repost if new serial port card and/or lower baud rate on win98 box and/or fix poor contacts doesnt' fix us back up. if noice or attenuation, you might expect the same behavior in ms-dos mode then wouldn't you. i tried to get them to reverify it is improved vastly in msdos mode but patience is required as nc guys now want to fix it themselve...which is good we all learn just takes longer and more diplomacy...
because what would change then serial comm port wise i wonderj, from ms-dos mode to windows mode. only control of serial port. so maybe this problem always existed and guys are forgetting to mention that. thanks, that is great info. we are running unshielded cables at least couple hundred feet i bet...

Collapse -

by sgt_shultz In reply to rs232 to DOS prgm on win9 ...

This question was closed by the author

Related Discussions

Related Forums