The software's Channel 0 emulator can help you debug the interface between your ladder logic program and a serial device connected to Channel 0 of an Enhanced PLC-5 or SLC processor. The emulator uses your computer's serial ports to emulate the port. (If you want to use a serial port to simulate Channel 0 as a DF1 or DH-485 port, see the Data Highway 485/DF1 emulation topic.)
Caution: RSLogix Emulate software does not support uploading from the emulator using another computer through an emulated Channel 0 port. Doing so may corrupt the emulated ladder logic program.
Configuring Channel 0 emulation for use with a serial device
To emulate Channel 0 connections to a serial device, you must configure one of your computer's COM ports to emulate Channel 0. To do this:
- Click Settings > Channel 0 ASCII Instructions. The software displays the Channel 0 ASCII Instruction Settings dialog.
- From the Port list box, select a COM port to connect to the serial device. Make sure you don't select a COM port that is used by another serial device (such as your mouse or other pointing device). Selecting None disables Channel 0 emulation.
- From the Baud list box, select the baud rate (communication speed) for the port. Make sure the baud rate matches that of the serial device you are connecting to your computer.
- From the Parity list box, select the parity mode you want to use with the port. Make sure the parity setting matches that of the serial device you are connecting to your computer.
- There are two sets of radio buttons underneath the list boxes. These are used to select the number of bits in each packet, and how many stop bits are in each packet. Click the settings that match the settings on the serial device you are connecting to your computer.
- Click OK. The software is now prepared to use the COM port as if it was Channel 0 while it emulates your ladder program.
Strategies for using Channel 0 emulation
In general, you should start Channel 0 emulation before attempting to communicate with your serial device.
Remember that the software scans a single main program file at a time. That program file and any subroutines it calls will be executed. Other files will not be scanned. If you are not communicating with your serial device, verify that the read and write instructions are actually being scanned.
Channel 0 emulation should work whether a debug file is defined or not. You can even change debug files without disturbing Channel 0 emulation. If you wish, you can specify blocks of program file and debug files to emulate, and Channel 0 emulation will still function normally.
No comments:
Post a Comment