We're working on a backup plan for a number of CNC machines (yes, after the fact and very late, go figure) and are having some issues. Most of the machines are using older software, but many are running some version of Windows. For these, I was wanting to go the P2V route and have the ability to run a virtual machine on a newer PC as a controller, but so far have not had any luck. I've tried both VMWare Player and Microsoft Virtual PC, but neither is able to accomplish the task of the PC currently in place.

For the virtual machines I used a ghost image of the PC currently controlling the CNC machine. With MS Virtual PC, the VM is set up to use both physical ports. The section of the settings file for serial ports on the VMWare VM looks like this:

# First serial port, physical COM1 is available
serial0.present = "TRUE"
serial0.fileType = "device"
serial0.fileName = "COM1"
serial0.autodetect = "TRUE"
serial0.hardwareFlowControl = "TRUE"
serial0.startconnected = "TRUE"
serial0.irq = 4
serial0.baseAddr = 0x03f8

# Optional second serial port, physical COM2 is not available
serial1.present = "TRUE"
serial1.fileType = "device"
serial1.fileName = "COM2"
serial1.autodetect = "FALSE"
serial1.hardwareFlowControl = "TRUE"
serial1.startconnected = "TRUE"
serial1.irq = 3
serial1.baseAddr = 0x02f8

For this particular machine, the computer is not actually controlling the CNC machine but instead is used to store individual job programs and transfer them to/from the PLC. The PC is connected via a parallel cable with a parallel-to-serial adapter at the PC end. Running batch file that handles the copying from within the virtual machine will show the same result on the PC screen ("1 file copied.") as if it is successful, but it doesn't seem to actually be transmitting to the PLC. Running the batch file from a newer machine itself (not in a virtual machine, but just from the command line) produces the same result.

I tried using (PortMon to see the difference between the PC currently being used, a virtual machine, and just a replacement machine, but was unable to get any data off the original (a PC running Windows 98).

I did notice that while I set the options for the serial port on the Windows XP machine to match that of the Windows 98 machine (the one currently being used), running the batch file sets its own options. These are the two commands:

mode com1:1200,e,7,1
copy %1.%2 com1

Typing "mode COM1:xon=on" at the command prompt will successfully turn XON/XOFF flow control on, but running the mode command in the batch file sets this back to the default of off. Typing "mode /?" will of course give the basic help for the mode command, but I can't seem to figure out how to simply turn XON/XOFF flow control to on by adding to the batch file command; all of the following result in an invalid parameter error:

mode com1:1200,e,7,1,off,on
mode com1:1200,e,7,1,to=off,xon=on
mode com1:1200,e,7,1,,on
mode com1:1200,e,7,1,,xon=on

If anyone knows what will work here, how to solve the communication error for a replacement/VM and the PLC, or any ideas on what else I might try, it would be greatly appreciated. Thanks in advance!