What is an MSP Driver?
An MSP driver is a small ladder logic program
that is added to the user program. All code is standard ladder logic. In GE 90 Micro it
requires set of lines of logic at the beginning of the main program. In modules supporting
subroutines this logic could be divided into one to three subroutines. One line of logic
in the main program calls the MSP Subroutine. This subroutine may be the complete driver
or in some versions it may call one or two other subroutines.
The user can import the driver into their program by opening the driver
file, selecting all the rungs, and writing them to a side file. Next the user will open
their program position the cursor at the beginning of the ladder logic program and
including the side file in their program. Alternately the user could start with our driver
and build their program from it.
Drivers.
The following is a list of drivers in the MSP Driver
Library for the GE 90 MICRO PLC. These drivers were prepared with GE's LogicMaster Micro
programming software, revision 3.01(31A1). The single channel input and single channel
output drivers are available on the Driver Installation disks. All other drivers are
available on our web site. They contain rung comments, address descriptions, and address
symbols that are viewable in the programming package and on printouts.
DRIVER |
DESCRIPTION |
| Msp_I |
1 Channel Input |
| Msp_I_M |
2 Channel Input Multiplexed |
| Msp_I_H |
1 Channel Input, High Speed Counter |
| Msp_O |
1 Channel Output |
| Msp_O_M |
2 Channel Output Multiplexed |
| Msp_IO |
1 Channel Input, 1 Channel Output |
| Msp_IO_M |
2 Channel Input Multiplexed,
2 Channel Output Multiplexed |
- Different Models.
All drivers for the 90 MICRO should work with very little revision
on other
a) GE's programming language and memory layout are very similar in all
models. In general, the 90 MICRO is a subset of the 90/30 and 90/70 series.
b) All models except the 90 Micro have subroutines, which would simplify
the multiplexed drivers.
c) GE models. The 90/30 and 90/70 series are modular and solid state
outputs are available. With solid state outputs speed can be increased without worry about
relay life. The output modules are available in both sink and source versions. See the
sections on inputs and output regarding these modules.
Timing Parameters.
These drivers are set up for the Delta protocol.
Following are some of the key timing parameters:
| Input |
|
| Protocol |
Delta |
| Scan Time |
10 msec (See Note 9) |
| Full Word Bits |
16 Bits |
| Delta Bits |
4 Bits |
| Delta Refresh Count |
16 Scan Refresh |
| ID Pulse Width |
1.2 Scans |
| Data Pulse Width |
3 Scans |
| Output |
|
| Protocol |
Delta |
| Scan Time |
50 msec (See Note 9) |
| Full Word Bits |
16 Bits |
| Delta Bits |
4 Bits |
| Delta Refresh Count |
16 Scan Refresh |
| ID Pulse Width |
3 Scans |
| Data Pulse Width |
3 Scans |
Quality Control File.
Included with the files for each driver is a
file of the same name with the ".sp" extension. This file contains the model and
serial numbers of all hardware and software used for testing. This file also contains the
setup parameters used for testing.
Scan Time.
The key to getting the driver to function properly is to
get the driver code executed and PLC I/O for the MSP updated at constant time intervals.
The 90 MICRO PLCs have the ability to fix the scan of the PLC. Constant
scan time is set in the processor configuration package under "I/O
Configuration". Use the arrow keys to move down to the field labeled "Sweep
Mode". Use the tab key to change the field to "CNST SWP". Next use the
arrow keys to move to the "Sweep Tmr" field and enter the desired time in msec.
The newer more powerful processors in the 90/30 series have periodic
subroutines. If available the MSP driver should be run from this subroutine and the scan
time could then float with the "Sweep Mode" set to "NORMAL". See the
GE manuals for how to set this up. Note that inputs will have to be updated at the
beginning the periodic subroutine using the DOIO instruction. Outputs will have to be set
at the end by also using the DOIO instruction. See the GE manuals on how the DOIO
instructions work.
Scan Time Exceptions.
When possible the scan time is set at 10 msec.
This is the default setting of the MSP. On some older models it may have to be slowed
down. Those models with relay outputs must be slowed down when using MSP analog outputs.
The mechanical relays are slow when compared to solid state and we us a scan time of 30
msec. Note that the Msp_IO_M driver effectively has 4 channels. For any of the multiplexed
drivers that are expanded to 4 or more channels on any model the scan time should be
watched closely and may have to be increased.
Programming Methods.
One of the key programming methods is the use
of memory locations that are accessed both as registers and bits. We used the M memory for
this purpose. In several cases we use a shift register as a counters. A seed is planted in
bit zero of the shift register word. To increment the counter by one the shift resistor is
shifted one bit. This allows the current value of counter to be checked by testing a
single bit in ladder, which is much more efficient than a whole register compare. These
programs have been extremely optimized for both minimum scan time and memory usage.
Programming Results.
Programming for GE processors yields
excessively complex code. GE does not permit branching around block instructions, which is
a serve limitation on making a program both understandable and efficient.
GE does support a continuation coil and contact. The mechanism intent is
to all rungs longer than 10 columns but it can be used for another purpose. Though messy
the mechanism can provide output branching for around block instructions. Once the
continuation coil has been determined its status can be referenced multiple times by
continuation contacts for different output branches. Once the status of the continuation
coil is determined it is not changed until it is used again.
The ladder logic has been refined and optimized to a very high degree. In
someways this may make the driver programs harder to read but it is felt that efficient
use of memory and execution time are the most important factors.
High Speed Counter (HSC).
The HSC driver is intended for the 90
Micro only. This driver uses less ladder logic memory but requires 2 inputs per channel.
Depending on the value transmitted it may be faster or much slower than the Delta
protocol. Unlike the Delta protocol the update time for the HSC protocol is not
deterministic.
The HSC driver uses Type A counters and up to four (4) input channels are
possible on a 90 Micro. The included driver is setup for a single channel on counter 1.
The built in HSC is not available usable on the other modular 90/30 and 90/70 series. It
would be possible using a similar approach with the high-speed counter module but the cost
would be uneconomical. See the documentation on the HSC modules for specific details.
Much of the setup of the counter is in the configurator. The desired
counters must be Type A. Each counter used must be enabled and the output disabled. The
count mode must be continuos and the count direction must be up. The high count limit must
be set to 32,767. The low count limit must be set to zero or some negative number. All of
the other parameters are not used and can be set to any value. See manuals for additional
information on the HSC.
The scan time on the MSP must be set greater than the maximum scan time of
the PLC. We used 10 msec for test purposes even though the scan time of the PLC was less
than 1 msec. This allows some room for the user to add their program. On the 90 Micro the
scan time was fixed. With only the driver program in the 90 Micro the scan time was so
fast that HSC was not updated every scan. The scan time was fixed just to slow down its
rate of execution. If the user program has a minimum scan time of more than 2 msec. scan
time could float.
In order to send a value of zero (0) or negative values an offset is added
to the pulse count before transmission. The driver then subtracts this offset after
counting the received pulses. Note the subtraction that occurs in the third rung. The
value of the offset varies depending on the MSP model and scale factor in order to keep
the offset to a minimum. The following table shows the offset for the different ranges.
The constant in the second rung must be changed to match the configuration of the MSP.
MSP MODEL |
SCALE FACTOR |
OFFSET |
| MSP-RTD |
X1 |
50 |
| MSP-RTD |
X10 |
500 |
| MSP-TC |
X1 |
50 |
| MSP-TC |
X10 |
500 |
| All other models |
|
1 |
As noted previously, each HSC uses two inputs. The MSP must
be connected to the count input that is %I1, %I3, %I5, and %I7 for HSCs for channels 1, 2
3 and 4 respectively. The Preload/Strobe inputs are %I2, %I4, %I6, and %I8 for HSCs or
channels 1, 2 3 and 4 respectively. If a counter is used for an MSP its corresponding
Preload/Strobe input must remain disconnected and can not be used for other purposes.