The Craftmans Shop > New from Old

The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)

<< < (88/260) > >>

awemawson:
I started this morning with three objectives:

a/ Prove the COM2: port on my laptop is working
b/ Prove that STEP5 is talking to the correct COM port
c/ Make sure that the baud rate, word length, parity and flow control all match

So by connecting my trusty RS232 breakout box using the same cable that I've been using to try and talk to the PLC, going to the command prompt under WIN-XP-Professional and issuing the command:

COPY CON COM2  (copy blocks from the CONsole to COM2:)

Sure enough I get activity on the transmit line - good, the port is working OK

Now here comes the oddity. If I use the MODE command to show how the port is set up I get 1200 baud, no parity, 7 data bits, 1 stop bit Xon/Xoff disabled and DTR/RTS enabled. But I have set it in Device Manager to be 9600 baud, no parity, 8 bits, 2 stop bits, using Xon/Xoff - see the picture with both on the screen at the same time !

So what happens if I run STEP5 with the port connected still to the breakout box? There is transmit activity - STEP5 IS talking to the correct com port :thumbup:

But look what happens to the port settings - under MODE we now have the correct baud rate, but wrong parity and flow control but under Device Manager everything is correct  :scratch:

And if I bring up Device Manager and the Command Prompt screens while STEP5 is running they still contradict each other  :scratch:

Another oddity is that I cannot get the MODE command to accept a setting for Xon/Xoff - I must not be understanding the syntax despite having the crib sheet on screen by entering mode /?

So something odd going on here - until I can get consistent port settings the PLC ain't going to talk ! Who is controlling this port ????

AdeV:
This:


--- Code: ---MODE COM3: xon=on
--- End code ---


worked for me...

Interestingly, I have mis-matched port settings in Windows 7 as well.... although this laptop doesn't have a real serial port, I wonder if Windows & "DOS" are somehow talking to different things?

AdeV:
A thought occurs to me... as this is a "real" serial port, rather than some witchcraft thing, can you set the default values in the BIOS to match your requirements?

awemawson:
Good thinking - I'll experiment after lunch  :thumbup:

awemawson:
No luck Ade, all I can set in the BIOS is enable/disable for the port  :(

This mode thing is VERY odd. If I use your syntax as a single parameter sure enough I can enable XON but not as one of a line of parameters.

If I set baud rate, no of data bits and parity as a mode command then follow with mode com2: xon=on as a subsequent command it sets XON ok but resets the bits back to 7/1  leaving the baud rate at 9600 :bang:

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version