584,862 active members*
4,805 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2009
    Posts
    5

    Old Computer Controller Backup/Replacement

    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!

  2. #2
    Join Date
    Jun 2003
    Posts
    3312
    I would be concerned about virutalization being able to handle the realtime tasking of I/O control if your acutally using machine control software. The VM supervisor has to interfere with priorities to manage the virtual resources.

    Regardless, I would think you should be able to get the com ports working. Are you sure your plc uses flow control?
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  3. #3
    Join Date
    Jun 2009
    Posts
    5
    Thanks for the response. I'm not sure, I'm just assuming (horrible idea, but it's all I've got). The settings in the device manager for the COM1 port are set to use XON/XOFF, and the mode command in the original PC does not have the option of setting flow control (so I assume it's using whatever is set by Windows). Is there a better way of figuring this out?

    Are there any resources you may be able to point me to in regards to managing priorities of virtual resources? Is there a better way to come up with a backup plan for these old machines?

  4. #4
    Join Date
    Jun 2003
    Posts
    3312
    I'm definitely not that versed on VMware or equivalent, so I'm not really much help. Just seeming how VMware is implemented I just can't see fundametally how it can manage realtime I/O. As Windows evloves it's getting more and more difficult to control I/O in a close to realtime application as the MACH3 community is finding out with a single PC and OS.

    Older software maybe programatically setting com I/O. You may need to splice in a serial analyzer and see what is actually happening in the conversations between hardware. A lot of older hardware didn't use flow control becuase the PC was the "controller" and the peripherial just listened and sent data back when the pc told it too, and the data rates were so slow that uart overflow wasn't a problem.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  5. #5
    Join Date
    Jun 2009
    Posts
    5
    I see...thanks for the info. Any recommendations on an inexpensive serial analyzer? A quick search brought me to thePICkit Serial Analyzer I'm certainly not very experienced with serial communication, but I understand the basics, am familiar with Visual Basic and it seems easy enough to implement...

  6. #6
    Join Date
    Jun 2003
    Posts
    3312
    Looks like thats for newer serial streams, SPI, I2C.... You should be able to look at the stream with a PC that has a serial port and software. A google search turned up this as an example: http://www.232analyzer.com/232default.htm or http://www.aggsoft.com/serial-port-m...2-analyzer.htm I suspect there are hundreds including free ones.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

Similar Threads

  1. Replacement Controller for CAMTech RMII
    By dpenley in forum Commercial CNC Wood Routers
    Replies: 7
    Last Post: 10-01-2010, 10:39 AM
  2. The Computer don`t comunicate with the controller
    By glenngb in forum Controller & Computer Solutions
    Replies: 0
    Last Post: 02-02-2009, 01:24 PM
  3. All in one computer/controller
    By LaserImage in forum CNC Machine Related Electronics
    Replies: 2
    Last Post: 10-31-2008, 02:10 PM
  4. computer controller that run on mac osx?
    By ataxy in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 3
    Last Post: 01-31-2008, 05:39 PM
  5. Replacement of VMCs with 104-d controller
    By SixStringer in forum Fadal
    Replies: 9
    Last Post: 08-14-2005, 06:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •