Notes: Modicon

Revision:     4.9

These Notes apply to the TSX Nano.  This product is sold by Square D and Telemecanique also.

Download this page along with the Memory Usage and Wiring Diagrams as a Microsoft Word file "Notes.doc" for best printing.  This file is included on the disks that come with the MSP and with all driver downloads.

  1. 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 the Nano it requires a set of lines of logic at the beginning of the main program to call one or two subroutines.

  2. The user can import the driver into their program. First the driver program must be opened and exported to an ASCII file. The symbols should also be exported. Next the user opens their program and imports the ASCII file. The symbols should also be imported. All logic from the driver program is added to the end of the user program. It should be cut and pasted to the proper locations. Alternately the user could start with our driver and paste their rungs into it or build their program from it.

  3. Drivers. The following is a list of drivers in the MSP Driver Library for the Modicon TSX Nano PLCs. These drivers were prepared with Modicon's PL7-07 programming software, revision 3.0. 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, and symbols that are viewable in the programming package and on printouts.

  4. 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
  5. Different Models. Modicon's product lines are diverse and evolving due to the merger with Square D and Telemecanique. The usability of these programs in other models is unknown.

  6. Program Documentation. With each driver is a Microsoft Word file that contains the program listing. We found the printing portion of the programming software to be very buggy. We were able to print to a file and then using Word we were able to clean it up and format it to get a usable printout.

  7. Timing Parameters. These drivers are set up for the Delta protocol. Following are some of the key timing parameters:

  8. 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 10 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
  9. 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.

  10. 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.

  11. The Nano executes its program with the driver code at a constant scan time. The scan mode is set in the "Configuration" pull down under "Scan Mode". The scan mode should be set to "Periodic" and the scan time is set under the "Period" in msec. Since I/O updates are automatically synchronized with scan no special immediate I/O update instructions are required.

    Periodic mode does not lock in scan time. If program execution takes longer than the set period program execution will control scan time. The periodic mode could be better viewed as a minimum scan time mode. Status bit %S19 is used to detect a scan time overrun in the periodic mode. Normally this status bit is set to "0". If a scan time overrun occurs in the periodic mode this bit will be set to "1". This bit latches in and must be reset by the user. If a scan time overrun occurs the "Period" in the scan mode configuration window must be increased and the Scan Time of the MSP must be increase to match the PLC. As the user program is developed this bit should be watched to insure reliable operation of the MSP.

    On the Nano any input can be use for the MSP. Input %I0.0 is the fastest input and is preferred. Note that %I0.0 also draws more current than other inputs. %I0.1 to %I0.7 are the next fastest inputs and are preferred over %I0.8 and up. No mater what input is used for the MSP its software filter in the configuration must be set to "No Filter".

  12. Scan Time Exceptions. When possible the scan time is set at 10 msec. This is the default setting of the MSP. 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 50 msec.

  13. Note that the Msp_IO_M driver effectively has 4 channels. In normal scan time mode this driver had a maximum scan time of 7 msec even though the average was 3 or 4 msec. This maximum leaves little room for the users program execution time. 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.

  14. Programming Results. Programming for Nano yields fairly clean and understandable code. The shift register instructions make shift register counters very efficient. The size of the rung is limited to 7 rows and in one case what should have been a single rung had to be divided into two rungs. Also, subroutine calls cannot be nested (a subroutine cannot call another subroutine). This forces much larger pieces of the multiplexed driver code to be in the main program than would be desired for better organization.

  15. 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.

  16. High Speed Counter (HSC). This driver uses less ladder logic memory. 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.

  17. The HSC driver uses the Up Counter mode of the Fast Counting (FC) function. In the Nano only one (1) channel is possible. The FC configuration was set for fast mode or 10 kHz. All optional inputs and outputs were disabled. See manuals for additional information on the FC.

    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.

    Beware of unstable operation at low frequencies and high scan rates. With only the driver program in the Nano the scan time was so fast that FC was not updated every scan when the frequency was less than 5 kHz. When the user adds their program and the minimum scan time exceeds 2 msec. the frequency can be reduced if required

    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 second 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

 


SensorPulse Corp. • P.O. Box 8886 • Michigan City, IN 46361 • Ph: (800) 447-5900 or (219) 393-7218 • Fax: (219) 393-7318

© 1998-2002 SensorPulse Corp., All Rights Reserved.
Updated July 2003