US20030023908A1 - System for and method of interfacing expansion modules with programmable logic controllers (PLC) - Google Patents

System for and method of interfacing expansion modules with programmable logic controllers (PLC) Download PDF

Info

Publication number
US20030023908A1
US20030023908A1 US09/957,347 US95734701A US2003023908A1 US 20030023908 A1 US20030023908 A1 US 20030023908A1 US 95734701 A US95734701 A US 95734701A US 2003023908 A1 US2003023908 A1 US 2003023908A1
Authority
US
United States
Prior art keywords
asic
parity bits
controller
expansion
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US09/957,347
Other versions
US6839785B2 (en
Inventor
Michael Massie
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Siemens Industry Inc
Original Assignee
Siemens Energy and Automation Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US09/814,221 external-priority patent/US6697903B2/en
Assigned to SIEMENS ENERGY & AUTOMATION, INC. reassignment SIEMENS ENERGY & AUTOMATION, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: MASSIE, MICHAEL R.
Priority to US09/957,347 priority Critical patent/US6839785B2/en
Application filed by Siemens Energy and Automation Inc filed Critical Siemens Energy and Automation Inc
Priority to EP02078572A priority patent/EP1296248A3/en
Priority to CNB021436142A priority patent/CN1311353C/en
Priority to CNA2006100958088A priority patent/CN1920803A/en
Publication of US20030023908A1 publication Critical patent/US20030023908A1/en
Publication of US6839785B2 publication Critical patent/US6839785B2/en
Application granted granted Critical
Assigned to SIEMENS INDUSTRY, INC. reassignment SIEMENS INDUSTRY, INC. MERGER (SEE DOCUMENT FOR DETAILS). Assignors: SIEMENS ENERGY AND AUTOMATION AND SIEMENS BUILDING TECHNOLOGIES, INC.
Adjusted expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/004Error avoidance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1854Scheduling and prioritising arrangements

Definitions

  • the present invention relates generally to interfacing control modules to other modules. More particularly, an exemplary embodiment of the present invention relates to interfacing expansion modules with programmable logic controllers (PLCs).
  • PLCs programmable logic controllers
  • the present invention relates to a communication interface for expansion modules used with programmable logic controllers.
  • This communication interface involves a processor that communicates to expansion modules in order to read and write discrete input/output, analog input/output, intelligent module control, and expansion module status.
  • these expansion modules are application specific integrated circuits (ASIC).
  • ASIC application specific integrated circuits
  • the ASIC has a state machine architecture that responds appropriately to the input/output expansion bus signals.
  • intelligence is included in the ASIC whereby error detection is made from the first byte of messages from the controller.
  • the ASIC detects when an erroneous message from the controller has been communicated and transmits a message to expansion modules that their output states not be changed in response to the message from the controller. As such, the erroneous message is ignored by the expansion modules.
  • An exemplary embodiment is related to a method of preventing the writing out of invalid data by a communication interface that interfaces a controller and input/output (I/O) devices.
  • This method can include decoding a control byte in a message communicated from a controller to an application specific integrated circuit (ASIC), determining which expansion module (EM) of a number of expansion modules is being addressed by the controller and what type of message is being communicated, generating parity bits, comparing the generated parity bits to parity bits attached to the control byte, and, if the parity bits do not match, issuing a signal to preserve output states for the number of expansion modules.
  • ASIC application specific integrated circuit
  • Another exemplary embodiment is related to a communication interface apparatus that responds to a communication protocol for interfacing expansion modules for reading and writing discrete input/output (I/O), analog I/O, intelligent module control and expansion module status.
  • the apparatus can include means for decoding a control byte in a message communicated from a controller, means for determining which expansion module (EM) of a number of expansion modules is being addressed by the controller and what type of message is being communicated, means for generating parity bits, means for comparing the generated parity bits to the parity bits attached to the control byte, and means for issuing a signal to preserve output states for the number of expansion modules if the parity bits do not match.
  • EM expansion module
  • Another exemplary embodiment is related to a system that provides serial communication to expansion modules to read and write discrete input/output, analog input/output, intelligent module control, and expansion module status.
  • This system can include state machine architecture that provides communication and control to a number of expansion modules and a controller that provides to the state machine architecture read messages and write messages.
  • the first byte of the read messages and write messages include control information and parity bits.
  • the state machine architecture is configured to: decode the control information from the controller, determine which of the number of expansion modules is being addressed by the controller and whether the message from the controller is a read or write message, generate test parity bits, compare the parity bits from the controller with the test parity bits, and communicate an error detection signal to the number of expansion modules if the parity bits from the controller and the test parity bits do not match.
  • FIG. 1 is a table of input/output (I/O) expansion bus signals as viewed by an expansion module (EM);
  • FIG. 2 is an expansion module printed wiring board (PWB) diagram 20 showing expansion bus pin assignments and connector key orientations;
  • PWB printed wiring board
  • FIG. 3 is a signal diagram of an expansion bus write cycle transaction
  • FIG. 4 is a signal diagram of an expansion bus read cycle transaction
  • FIG. 5 is a table of ASIC pin assignments, signal names, buffer types, and signal descriptions
  • FIG. 6 is a circuit diagram illustrating an expansion module (EM) slave application specific integrated circuit (ASIC) connected to an I/O expansion bus;
  • EM expansion module
  • ASIC application specific integrated circuit
  • FIG. 7 is a set of ASIC modules connected together
  • FIG. 8 is a table of ASIC modes according to various values
  • FIG. 9 is a table of address and control parts used in mode 1 of operation.
  • FIG. 10 is a table of bus signals used in mode 2 of operation
  • FIG. 11 is a block diagram of an analog input access sequence by the PLC
  • FIG. 12 is a block diagram of an analog output access sequence by the PLC
  • FIG. 13 is a circuit diagram that sets an oscillator period
  • FIG. 14 is a timer circuit
  • FIGS. 15 - 23 are timing diagrams of ASIC signals for various message types and conditions
  • FIGS. 24 - 28 are timing diagrams of instructions in an analog input by a PLC.
  • FIGS. 29 - 31 are timing diagrams of instructions in an analog output by a PLC.
  • an interface of the present invention provides serial communication to expansion modules (EM).
  • EM expansion modules
  • a CPU of the interface controls all communications to and from the EM's and is referred to herein as the “Master Function”.
  • the Expansion Module includes an ASIC to achieve this serial communication protocol and will be referred to as the “Slave Function” or “Slave ASIC”.
  • FIG. 1 illustrates a table 10 of exemplary input/output (I/O) expansion bus signals as viewed by an expansion module (EM).
  • the connection from the PLC to the EM and from EM to EM is preferably 1 to 1 using a 10 pin header type connection.
  • FIG. 2 illustrates an exemplary expansion module printed wiring board (PWB) diagram 20 showing expansion bus pin assignments and connector key orientations.
  • PWB printed wiring board
  • FIGS. 3 - 4 illustrate an expansion bus read cycle and write cycle sequence.
  • a bus transaction is initiated by short active low pulse on XA_OD signal.
  • XA_OD signal In FIG. 3:
  • RA Register address for registers R 0 to R 15 (4 bits)
  • Ack Module acknowledge of a good write cycle (2 bits)
  • RA Register address for registers R 0 to R 15 (4 bits)
  • FIG. 5 illustrates a table 50 showing pin assignments, signal names, buffer types, and signal descriptions for an EM SLAVE ASIC.
  • the input/output (I/O) of the ASIC accommodates all Expansion Module I/O configurations. That is, the ASIC is a universal interface. The universality is accomplished by implementing multiple modes of operation within the ASIC. These multiple modes of operation are described further below with reference to FIGS. 15 - 31 .
  • FIG. 6 illustrates an expansion module (EM) SLAVE ASIC 62 connected to an I/O expansion bus.
  • External hysteresis gates 64 provide additional hysteresis to ensure the quality of the clock is maintained.
  • EM SLAVE ASIC 62 implements analog schmitt trigger input buffers 66 on all critical input signals to guard against electrical noise disturbances. The analog schmitt trigger inputs are applied to EMC_I, EMC_N, XAS, XOD, and EXP 2 input signals.
  • EM SLAVE ASIC 62 has been designed so that external hysteresis gates 64 can be removed. Only one clock input is active and the other clock input is pulled to the appropriate state.
  • the data signal, EMD, on the I/O expansion bus is a bi-directional signal and the direction control and buffering are controlled by EM SLAVE ASIC 62 .
  • EM SLAVE ASIC 62 is designed to receive and re-transmit the I/O expansion bus signals to the next module downstream or to re-transmit data from a module downstream back to the PLC.
  • Signals XAS and XOD are derived from the I/O expansion bus signal XAOD.
  • the XAS signal follows the XAOD signal and a short active low pulse (1 clock period) that is sampled on the rising clock edge initiates a bus transaction.
  • the signal XOD filters out the short active low pulse, XAS, and becomes valid only when XAOD has been low for 10 ⁇ sec or more.
  • Signal XOD is an asynchronous input into the ASIC and resets the ASIC AND CLEARS ALL OUTPUTS.
  • the output signal, ASIC_XAOD is used as the XAOD input to the next module downstream.
  • This output signal includes the XAS and XOD functions with the addition of an ASIC generated synchronous XAS signal (ASIC_XAS).
  • ASIC_XAS becomes active low when a parity error has been detected on the first byte of the bus message and remains low for approximately 2.2 ⁇ sec. Modules downstream detect an active XAS, thus preserving the output data.
  • the input module address, MA_IN[2:0], is latched when XOD releases on power up and can only change when XOD is low.
  • the next module address, MA_OUT[2:0], is generated by incrementing the input module address by one and is transmitted to the next module downstream.
  • the first expansion module has module address of zero and a total of eight expansion modules can be cascaded.
  • EM SLAVE ASIC 62 provides two bi-directional buffers 68 and 69 to properly handle the data signal on the I/O expansion bus.
  • the EMD buffer (bi-directional buffer 68 ) transmits and receives data with a PLC or with an expansion module upstream (an expansion module of lesser physical address).
  • Bi-directional buffer 69 (EMD_NEXT_EM, transmits and receives data with an expansion module downstream (an expansion module of a greater physical address).
  • the direction of bi-directional buffers 68 and 69 is controlled by the state machine logic of EM SLAVE ASIC 62 as follows.
  • EMD buffer 68 defaults as an input and changes to an output when EM SLAVE ASIC 62 has determined the PLC has addressed that module or a module with a greater address and a response is being requested.
  • EMD_NEXT_EM buffer 69 defaults as an output and changes to an input when EM SLAVE ASIC 62 has determined a module having a greater address than itself has been requested to respond to the PLC.
  • the EMD_NEXT_EM signal drives the data bus low during a response to the PLC when it has been addressed or a module upstream has been addressed.
  • EM SLAVE ASIC 62 provides a non-inverting (EMC_N) and an inverting clock (EMC_I) inputs.
  • EMC_N non-inverting
  • EMC_I inverting clock
  • EMC_O non-inverting clock
  • FIG. 7 illustrates an ASIC series 72 (ASIC 72 a , 72 b , 72 c ) and an ASIC series 74 (ASIC 74 a , 74 b , 74 c ).
  • ASIC series 72 is a collection of three connected ASIC modules where the CPU has control. Buffers 76 (shown in shaded color) are in use when the CPU has control.
  • ASIC series 74 is a collection of three connected ASIC modules having addresses 0 , 1 , and 2 .
  • ASIC series 74 shows the state of operation where the CPU has addressed EM module 74 b and EM module 74 b responds and EM module 74 a passes data through to the CPU. Buffers 78 are used in this operation.
  • FIG. 8 provides a table 80 listing the ASIC mode according to the ID_BUF and ANA_TYPE values.
  • EM SLAVE ASIC 62 has three modes of operation to support all types of expansion modules.
  • the identification Register (ID_BUF) is input into the ASIC at initial power and its value is decoded by the ASIC to determine the mode of operation.
  • the input signal, ANA_TYPE is used to select between mode 1 or mode 2 operation when the ID_BUF has been decoded to be of an analog type.
  • EM SLAVE ASIC mode 0 provides eight discrete inputs and eight discrete outputs and does not require external registers. Mode 0 is referred to as the discrete mode.
  • EXT 0 port operates as an 8 bit data input port and EXT 1 port operates as an active low, 8 bit data output port.
  • the function of signals EXP 0 , EXP 1 , and EXP 2 , and EXP 4 are mode dependent.
  • signals EXP 0 , EXP 1 , and EXP 2 are used for the watch dog timer function, described further below with respect to FIGS. 13 - 14 .
  • EM SLAVE ASIC mode 1 provides a bus interface used by intelligent modules, analog modules with an on board microprocessor or modules requiring more than eight inputs and eight outputs. Mode 1 can be referred to as the bus interface mode.
  • the EXT 0 port operates as an active high, 8 bit bi-directional data port and EXT 1 port consists of 8 bits of address and control.
  • FIG. 9 includes a table 90 of the EXT 1 address and control port in mode 1 .
  • the watch dog timer function can utilize signals EXP 0 , EXP 1 , and EXP 2 .
  • the signal EXP 4 is an input in mode 1 and can be referred to as WDTO.
  • the watch dog timeout (WDTO) input is used on intelligent modules or a module containing a local processor. If the local processor's watch dog timer fires, then the WDTO signal becomes active high.
  • the EM SLAVE ASIC responds to this input by returning all 1 's to the PLC on any response message. For example, during a READ cycle, the EM SLAVE ASIC returns eight data bits of 1 and two parity bits of 1 . The PLC recognizes a parity error on the READ data and does not process the information.
  • the EM SLAVE ASIC allows modules downstream to communicate even when the WDTO has become active high.
  • FIGS. 21 and 22 provide an example of a mode 1 Read and Write sequence and timing of these signals.
  • Mode 2 operation is specific to the non-intelligent analog modules and provides the required setup and control of a specific Analog to Digital Converter (ADC), Digital to Analog Converter (DAC), and Analog Input Multiplexer.
  • ADC Analog to Digital Converter
  • DAC Digital to Analog Converter
  • the EXT 0 bus is used as an 8 bit, active high, bi-directional data bus used to transmit and receive data with the DAC and ADC devices.
  • the EXT 1 bus is used to control the ADC and MUX devices and is illustrated in a table 100 of FIG. 10.
  • mode 2 the signal EXP 0 , EXP 1 , EXP 2 , and EXP 4 are used to control the DAC device and are illustrated in FIG. 2.
  • Mode 2 operation follows a unique instruction sequence issued by the PLC to access the analog devices. A description of the PLC instruction sequence used in mode 2 is described further with respect to FIGS. 11 and 12 . An illustration of the sequence and timing of these signals is described further with reference to FIGS. 24 - 31 .
  • Analog inputs are accessed in specific sequential instruction order by the PLC. If the PLC detects an error on any instruction during the sequence, then the PLC may re-try the failed instruction without having to start the sequence.
  • a step 112 analog inputs are accessed from BANK 0 and the PLC selects a BANK 0 by writing the hex value 0 to register address 2 h (R 2 ).
  • BANK 0 has 4 MUX channels to select from and the PLC selects the MUX channel by writing any value to the most significant bit (MSB) location of the desired channel.
  • MSB most significant bit
  • ADC conversion is initiated by a PLC Write to the least significant bit (LSB) of the desired channel.
  • LSB least significant bit
  • the PLC reads the MSB and a MSB read also resets the MUX device so that no inputs are selected.
  • a step 119 the PLC Reads the LSB.
  • the LSB Read transaction starts another ADC conversion, therefore the LSB value are stored in a temporary register in the ASIC. This allows the PLC to re-try the LSB Read again.
  • a PLC Read of any one of the Status Registers or any Write transaction releases the temporary register.
  • Analog outputs are accessed in specific sequential instruction order by the PLC. If the PLC detects an error on any instruction during the sequence, then the PLC may re-try the failed instruction without having to start the sequence over.
  • a step 122 analog outputs are accessed from BANK 4 .
  • the PLC selects BANK 4 by writing the value 4 h to register address 2 h (R 2 ).
  • BANK 4 has up to four Analog Output Channels.
  • the PLC selects the analog output channel by addressing the MSB of the desired channel. The MSB byte is written to the DAC during this transaction.
  • the PLC then addresses the LSB of the desired channel. The LSB byte is written to the DAC and a short period later a DAC Load occurs.
  • the watch dog timer operation is now described in accordance with an exemplary embodiment.
  • External pins EXP 0 , EXP 1 , and EXP 2 are used to implement the watch dog function in Modes 0 and 1 .
  • One purpose of the watch dog is to disable all discrete outputs in the event that the CPU fails to communicate with the expansion module over a specified period of time.
  • the watch dog timer function is enabled when the ASIC is in mode 0 or 1 operation.
  • the watch dog is reset by the occurrence of XOD or a valid ACK returned to the CPU. If neither of these events occur then all outputs are cleared after the watch dog has timed out. Once the watch dog has timed out it remains idle until either XOD is issued or a valid ACK is returned to the CPU.
  • mode 0 the outputs are cleared internal to the ASIC.
  • mode 1 the signal EXP 0 is used to clear the external registers and is referred to as EXT_CLR.
  • the control port EXT 1 is set to all one's if the watch dog times out.
  • signal EXP 2 is used as watch dog clock input (CLK_IN).
  • An external oscillator circuit such as a LM555 timer circuit, drives the “analog schmitt trigger” clock input EXP 2 .
  • the EM SLAVE ASIC does provide an inverted clock output signal, EXP 1 , that can be used for feedback into an external RC network in the case the LM555 timer circuit is not used.
  • FIG. 13 illustrates an RC network circuit 130 that sets an oscillator period of approximately 590 ⁇ sec.
  • the EM SLAVE ASIC is preset to 1200 counts and given the oscillator period of 590 ⁇ sec, the watch dog period is approximately 708 msec.
  • FIG. 14 illustrates a timer circuit implementation 140 .
  • the expansion module (EM) SLAVE ASIC operation is described according to an exemplary embodiment.
  • the EM SLAVE ASIC implements a state machine architecture to provide proper communication and control.
  • the first byte of either message is the CONTROL byte with two bits a parity.
  • the EM SLAVE ASIC decodes the CONTROL byte and determines which EM module the PLC is addressing, the message type (READ or WRITE) and the register being accessed.
  • the EM SLAVE ASIC generates two bits of parity on the received CONTROL byte and compares their values to the parity bits attached to the CONTROL byte. If the parity bits do not compare then the EM SLAVE ASIC issues an active ASIC_XAS for approximately 2.2 ⁇ sec. The ASIC_XAS is transmitted to the next module downstream via XAOD signal, thus preserving the state of the outputs.
  • the second byte of a WRITE message is the WRITE data byte with two parity bits.
  • the EM SLAVE ASIC generates parity on the WRITE data byte and compares this value to the parity received with the WRITE data byte. If the values do not equal, then the EM SLAVE ASIC responds to the PLC with an invalid Acknowledge (11). In the case the parity values do equal, then the EM SLAVE ASIC responds to the PLC with a valid Acknowledge (01) and the output data bus is updated with new data. The Acknowledge data is transmitted to the PLC on the rising clock edge.
  • the second byte of a READ message is a response to the PLC from the EM SLAVE ASIC and consists of a READ byte and two parity bits generated by the EM SLAVE ASIC.
  • the EM SLAVE ASIC transmits the READ data byte and parity bits to the PLC on the rising clock edge.
  • the PLC issues an active XOD signal. Detection of XOD places the state machine into its home state and discrete outputs and analog outputs are cleared. Also at initial power up, the EM SLAVE ASIC determines its Module Address (MA_IN), Mode of operation (Mode 0 , 1 , or 2 ) and propagates the next Module Address (MA_OUT) by incrementing its Module Address by one. Once XOD is released, the EM SLAVE ASIC latches the module address, MA_IN.
  • a bus transaction is initiated when an active XAS signal is sampled on the rising edge of the clock. The state machine transitions from its home state to state 0 when XAS is sampled true. The state machine is initialized when entering state 0 and propagates to state 1 on the next rising clock edge. If at any time the XOD signal becomes active, then all outputs are asynchronously reset and the state machine returns to its home state.
  • FIGS. 15 - 23 illustrate timing diagrams 150 , 160 , 170 , 180 , 190 , 200 , 210 , 220 , and 230 of EM SLAVE ASIC signals for various message types and conditions.
  • new data is enabled on the output port EXT 1 on the rising edge of clock 21 .
  • EXT 1 port is an active low output port.
  • input data to external port EXT 0 is enabled for one clock period and is registered internal to the ASIC on the falling edge of clock 12 .
  • the internal registered read data begins to serially shift out on the EMD signal on the rising edge of clock 13 .
  • the minimum register setup time is 10 nsec and the minimum hold time is 10 nsec.
  • the parity generated on the control byte is compared to the parity attached to the control byte and the result registered on the falling edge of clock 10 .
  • the EM SLAVE ASIC generates its own XAS signal and becomes active low on the rising edge of clock 11 and remains low for nine clock periods.
  • the ASIC signal ASIC_XAS is gated with CPU generated signals XAS and XOD.
  • the resulting output, ASIC_XAOD is used as the XAOD signal for the next module downstream.
  • the purpose of the ASIC generated XAS signal is to preserve the I/O data of expansion modules downstream when a parity error has been detected on the control byte.
  • the EM SLAVE ASIC samples the XAS input signal on clocks 0 and 12 only. If the EM SLAVE ASIC samples an active XAS on clock 12 , then it returns to its home state thus preventing invalid data from being written to the outputs.
  • the EM SLAVE ASIC responds to the CPU with an invalid Acknowledge and the EXT 1 data is not updated with new data when a parity has been detected on the Write data byte.
  • a parity error on the Write data byte does not generate an active ASIC_XAS signal as a parity error on the control byte does.
  • the READ Message in FIG. 20 illustrates the EM SLAVE ASIC response when the CPU has addressed an EM with a higher physical address.
  • the READ Byte is driven by the module downstream that was addressed.
  • Signals EMD_TRI_EN and NEXT_EM_TRI_EN show the direction control of the EMD bi-directional data buffers.
  • the EXT 0 port is an active high bi-directional data port and EXT 1 port is used as eight bits of control.
  • expansion modules that have an on board processor have a watch dog time out signal.
  • the EM SLAVE ASIC provides an input, WDTO or EXP 4 , to monitor the state of the watch dog time out of the local processor.
  • the EM SLAVE ASIC operates normally when WDTO is low. If the WDTO signal becomes high, the EM SLAVE ASIC responds to the CPU with all 1 's during a Read Message response. This forces a parity error on the data read by the CPU, thus preventing the CPU from responding to invalid data.
  • the EM SLAVE ASIC does not disable other modules that maybe connected to the system if the local processor has times out. In other words, the EM SLAVE ASIC responds appropriately to messages intended for other expansion modules even when the local processor has timed out.
  • FIGS. 24 - 28 illustrate timing diagrams of five exemplary instructions and show the timing requirements of the EM SLAVE ASIC in mode 2 .
  • the EM SLAVE ASIC allows the PLC to re-try any of the give instructions without having to start the sequence over.
  • the PLC selects bank 0 by writing 0 hex to register 2 or bank 1 by writing 1 hex to register 2 .
  • the EM SLAVE ASIC recognizes this to be the first instruction of an analog input sequence.
  • the PLC selects the input channel to read by writing any value to the MSB location of the desired input channel.
  • the EM SLAVE ASIC decodes the message and causes the MUX to select the desired input channel.
  • the PLC initiates the Analog to Digital conversion by writing any value to the LSB of the desired channel.
  • the EM SLAVE ASIC decodes this message and causes the ADC_BYTE_SEL signal to go low and the ADC_RD signal to pulse low. These two conditions cause the ADC to start the conversion.
  • the PLC reads the most significant bit (MSB) of the converted analog signal.
  • the EM SLAVE ASIC addresses the MSB by setting ADC_BYTE_SEL high and enables the MSB onto the EXT 0 data bus on the falling edge of clock 10 and holding until the falling edge of clock 13 .
  • the EM SLAVE ASIC registers the MSB on the falling edge of clock 12 and begin shifting the new data back to the PLC on clock 13 .
  • the PLC reads the least significant bit (LSB) of the converted analog signal.
  • the EM SLAVE ASIC addresses the LSB by setting ADC_BYTE_SEL low and enables the LSB onto the EXT 0 data bus on the falling edge of clock 10 and holding until the falling edge of clock 13 .
  • the LSB is registered on the falling edge of clock 12 and begins shifting the new data back to the PLC on clock 13 .
  • the LSB Read instruction also causes the ADC to initiate a new conversion and therefore the LSB is placed in a temporary holding register internal to the ASIC. This allows the PLC to re-try the last instruction and receive valid data.
  • the holding register is released on any Write transaction or any status register Read transaction.
  • FIGS. 29 - 31 illustrate timing diagrams of three exemplary instructions and show the timing requirements of the EM SLAVE ASIC in mode 2 .
  • the EM SLAVE ASIC allows the PLC to re-try any of the three instructions without having to start the sequence over.
  • the PLC selects bank 4 by writing 4 hex to register 2 .
  • the EM SLAVE ASIC recognizes this to be the first instruction of an analog output sequence.
  • the PLC selects the analog output channel by writing to the MSB location of that channel.
  • the MSB also is written to the digital to analog converter during this instruction.
  • the ME SLAVE ASIC sets ADDR_DAC high on the rising edge of clock 16 .
  • the MSB is enabled onto the bus on the rising edge of clock 21 and is enabled into the DAC latch on the rising edge of clock 22 .
  • the MSB is latched into the DAC on the rising edge of clock 23 .
  • the PLC addresses the LSB of the desired channel and write the LSB value to the digital to analog converter.
  • the EM SLAVE ASIC pulls the ADDR_DAC signal low on the rising edge of clock 16 .
  • the LSB is enabled onto the EXZT 0 data bus on the rising edge of clock 21 and enabled into the DAC latch on the rising edge of clock 22 .
  • the rising edge of WR_DAC— 0 causes the DAC to latch the LSB and the rising edge of LD_DAC causes the digital to analog conversion

Abstract

A communication interface involves a processor that communicates to expansion modules in order to read and write discrete input/output, analog input/output, intelligent module control, and expansion module status. The expansion modules can be application specific integrated circuits (ASIC), each having a state machine architecture that responds appropriately to the input/output expansion bus signals. The ASIC can include error detection using the first byte of messages from the controller. Thus, the ASIC detects when an erroneous message from the controller has been communicated and transmits a message to expansion modules that their output states not be changed in response to the message from the controller.

Description

    CROSS-REFERENCE TO RELATED APPLICATIONS
  • The present application is a continuation-in-part (CIP) application of U.S. patent application Ser. No. 09/814,221, entitled “Slave ASIC”, filed on Mar. 21, 2001, by Michael R. Massie and Alan McNutt and assigned to the same assignee as the present application. The present application claims priority to this prior application and incorporates it by reference in its entirety.[0001]
  • FIELD OF THE INVENTION
  • The present invention relates generally to interfacing control modules to other modules. More particularly, an exemplary embodiment of the present invention relates to interfacing expansion modules with programmable logic controllers (PLCs). [0002]
  • BACKGROUND OF THE INVENTION
  • Heretofore, interfaces have been used that interface a control module to other modules. However, no universal interface for interfacing a plurality of communications protocol was available until the system and method particularly contemplated by the invention described and claimed in U.S. patent application Ser. No. 09/814,221, entitled “Slave ASIC”, incorporated herein by reference in its entirety. [0003]
  • Nevertheless, there is a need for an improved system for and method of interfacing expansion modules with programmable logic controllers (PLCs). Further, there is a need to detect the presence of an error on the first byte of a communication signal to prevent writing out invalid data. [0004]
  • SUMMARY OF THE INVENTION
  • The present invention relates to a communication interface for expansion modules used with programmable logic controllers. This communication interface involves a processor that communicates to expansion modules in order to read and write discrete input/output, analog input/output, intelligent module control, and expansion module status. In one embodiment, these expansion modules are application specific integrated circuits (ASIC). The ASIC has a state machine architecture that responds appropriately to the input/output expansion bus signals. In an exemplary embodiment, intelligence is included in the ASIC whereby error detection is made from the first byte of messages from the controller. Thus, the ASIC detects when an erroneous message from the controller has been communicated and transmits a message to expansion modules that their output states not be changed in response to the message from the controller. As such, the erroneous message is ignored by the expansion modules. [0005]
  • An exemplary embodiment is related to a method of preventing the writing out of invalid data by a communication interface that interfaces a controller and input/output (I/O) devices. This method can include decoding a control byte in a message communicated from a controller to an application specific integrated circuit (ASIC), determining which expansion module (EM) of a number of expansion modules is being addressed by the controller and what type of message is being communicated, generating parity bits, comparing the generated parity bits to parity bits attached to the control byte, and, if the parity bits do not match, issuing a signal to preserve output states for the number of expansion modules. [0006]
  • Another exemplary embodiment is related to a communication interface apparatus that responds to a communication protocol for interfacing expansion modules for reading and writing discrete input/output (I/O), analog I/O, intelligent module control and expansion module status. The apparatus can include means for decoding a control byte in a message communicated from a controller, means for determining which expansion module (EM) of a number of expansion modules is being addressed by the controller and what type of message is being communicated, means for generating parity bits, means for comparing the generated parity bits to the parity bits attached to the control byte, and means for issuing a signal to preserve output states for the number of expansion modules if the parity bits do not match. [0007]
  • Another exemplary embodiment is related to a system that provides serial communication to expansion modules to read and write discrete input/output, analog input/output, intelligent module control, and expansion module status. This system can include state machine architecture that provides communication and control to a number of expansion modules and a controller that provides to the state machine architecture read messages and write messages. The first byte of the read messages and write messages include control information and parity bits. The state machine architecture is configured to: decode the control information from the controller, determine which of the number of expansion modules is being addressed by the controller and whether the message from the controller is a read or write message, generate test parity bits, compare the parity bits from the controller with the test parity bits, and communicate an error detection signal to the number of expansion modules if the parity bits from the controller and the test parity bits do not match. [0008]
  • Other principle features and advantages of the invention will become apparent to those skilled in the art upon review of the following drawings, the detailed description, and the appended claims.[0009]
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • Exemplary embodiments of the invention will hereafter be described with reference to the accompanying drawings, wherein like numerals denote like elements, and: [0010]
  • FIG. 1 is a table of input/output (I/O) expansion bus signals as viewed by an expansion module (EM); [0011]
  • FIG. 2 is an expansion module printed wiring board (PWB) diagram [0012] 20 showing expansion bus pin assignments and connector key orientations;
  • FIG. 3 is a signal diagram of an expansion bus write cycle transaction; [0013]
  • FIG. 4 is a signal diagram of an expansion bus read cycle transaction; [0014]
  • FIG. 5 is a table of ASIC pin assignments, signal names, buffer types, and signal descriptions; [0015]
  • FIG. 6 is a circuit diagram illustrating an expansion module (EM) slave application specific integrated circuit (ASIC) connected to an I/O expansion bus; [0016]
  • FIG. 7 is a set of ASIC modules connected together; [0017]
  • FIG. 8 is a table of ASIC modes according to various values; [0018]
  • FIG. 9 is a table of address and control parts used in [0019] mode 1 of operation;
  • FIG. 10 is a table of bus signals used in [0020] mode 2 of operation;
  • FIG. 11 is a block diagram of an analog input access sequence by the PLC; [0021]
  • FIG. 12 is a block diagram of an analog output access sequence by the PLC; [0022]
  • FIG. 13 is a circuit diagram that sets an oscillator period; [0023]
  • FIG. 14 is a timer circuit; [0024]
  • FIGS. [0025] 15-23 are timing diagrams of ASIC signals for various message types and conditions;
  • FIGS. [0026] 24-28 are timing diagrams of instructions in an analog input by a PLC; and
  • FIGS. [0027] 29-31 are timing diagrams of instructions in an analog output by a PLC.
  • DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS
  • A system for and method of interfacing expansion modules with programmable logic controllers (PLCs) are described. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be evident, however, to one skilled in the art that the exemplary embodiments may be practiced without these specific details. In other instances, structures and devices are shown in block diagram form in order to facilitate description of the exemplary embodiments. [0028]
  • In an exemplary embodiment, an interface of the present invention provides serial communication to expansion modules (EM). A CPU of the interface controls all communications to and from the EM's and is referred to herein as the “Master Function”. The Expansion Module includes an ASIC to achieve this serial communication protocol and will be referred to as the “Slave Function” or “Slave ASIC”. [0029]
  • FIG. 1 illustrates a table [0030] 10 of exemplary input/output (I/O) expansion bus signals as viewed by an expansion module (EM). The connection from the PLC to the EM and from EM to EM is preferably 1 to 1 using a 10 pin header type connection.
  • FIG. 2 illustrates an exemplary expansion module printed wiring board (PWB) diagram [0031] 20 showing expansion bus pin assignments and connector key orientations.
  • FIGS. [0032] 3-4 illustrate an expansion bus read cycle and write cycle sequence. A bus transaction is initiated by short active low pulse on XA_OD signal. In FIG. 3:
  • MA—Module Address for [0033] modules 0 to 6 (3 bits)
  • R—Read/Write bit (Read active low) [0034]
  • RA—Register address for registers R[0035] 0 to R15 (4 bits)
  • CP—Control parity generated by the CPU on MA, R, RA (2 bits) [0036]
  • Write Data—Data written to the module (8 bits) [0037]
  • DP—Data parity generated by the CPU on write data (2 bits) [0038]
  • Ack—Module acknowledge of a good write cycle (2 bits) [0039]
  • In FIG. 4: [0040]
  • MA—Module Address for [0041] modules 0 to 6 (3 bits)
  • R—Read/Write bit (Read active low) [0042]
  • RA—Register address for registers R[0043] 0 to R15 (4 bits)
  • CP—Control parity generated by the CPU on MA, R, RA (2 bits) [0044]
  • Read Data—Data read from the module (8 bits) [0045]
  • DP—Data parity generated by the CPU on write data (2 bits) [0046]
  • FIG. 5 illustrates a table [0047] 50 showing pin assignments, signal names, buffer types, and signal descriptions for an EM SLAVE ASIC. The input/output (I/O) of the ASIC accommodates all Expansion Module I/O configurations. That is, the ASIC is a universal interface. The universality is accomplished by implementing multiple modes of operation within the ASIC. These multiple modes of operation are described further below with reference to FIGS. 15-31.
  • FIG. 6 illustrates an expansion module (EM) [0048] SLAVE ASIC 62 connected to an I/O expansion bus. External hysteresis gates 64 provide additional hysteresis to ensure the quality of the clock is maintained. In addition to external hysteresis gates 64, EM SLAVE ASIC 62 implements analog schmitt trigger input buffers 66 on all critical input signals to guard against electrical noise disturbances. The analog schmitt trigger inputs are applied to EMC_I, EMC_N, XAS, XOD, and EXP2 input signals.
  • [0049] EM SLAVE ASIC 62 has been designed so that external hysteresis gates 64 can be removed. Only one clock input is active and the other clock input is pulled to the appropriate state. The data signal, EMD, on the I/O expansion bus is a bi-directional signal and the direction control and buffering are controlled by EM SLAVE ASIC 62.
  • [0050] EM SLAVE ASIC 62 is designed to receive and re-transmit the I/O expansion bus signals to the next module downstream or to re-transmit data from a module downstream back to the PLC. Signals XAS and XOD are derived from the I/O expansion bus signal XAOD. The XAS signal follows the XAOD signal and a short active low pulse (1 clock period) that is sampled on the rising clock edge initiates a bus transaction. The signal XOD filters out the short active low pulse, XAS, and becomes valid only when XAOD has been low for 10 μsec or more. Signal XOD is an asynchronous input into the ASIC and resets the ASIC AND CLEARS ALL OUTPUTS. The output signal, ASIC_XAOD, is used as the XAOD input to the next module downstream. This output signal includes the XAS and XOD functions with the addition of an ASIC generated synchronous XAS signal (ASIC_XAS). The ASIC_XAS becomes active low when a parity error has been detected on the first byte of the bus message and remains low for approximately 2.2 μsec. Modules downstream detect an active XAS, thus preserving the output data.
  • The input module address, MA_IN[2:0], is latched when XOD releases on power up and can only change when XOD is low. The next module address, MA_OUT[2:0], is generated by incrementing the input module address by one and is transmitted to the next module downstream. The first expansion module has module address of zero and a total of eight expansion modules can be cascaded. [0051]
  • [0052] EM SLAVE ASIC 62 provides two bi-directional buffers 68 and 69 to properly handle the data signal on the I/O expansion bus. The EMD buffer (bi-directional buffer 68) transmits and receives data with a PLC or with an expansion module upstream (an expansion module of lesser physical address). Bi-directional buffer 69, EMD_NEXT_EM, transmits and receives data with an expansion module downstream (an expansion module of a greater physical address). The direction of bi-directional buffers 68 and 69 is controlled by the state machine logic of EM SLAVE ASIC 62 as follows. EMD buffer 68 defaults as an input and changes to an output when EM SLAVE ASIC 62 has determined the PLC has addressed that module or a module with a greater address and a response is being requested. EMD_NEXT_EM buffer 69 defaults as an output and changes to an input when EM SLAVE ASIC 62 has determined a module having a greater address than itself has been requested to respond to the PLC. The EMD_NEXT_EM signal drives the data bus low during a response to the PLC when it has been addressed or a module upstream has been addressed.
  • [0053] EM SLAVE ASIC 62 provides a non-inverting (EMC_N) and an inverting clock (EMC_I) inputs. When external hysteresis gates 64 are used, the inverting clock input is active and the non-inverting clock inputs pulled high. In the case no hysteresis gates are used, then the non-inverting clock input is active and the inverting clock input is pulled low. In either case the, EM SLAVE ASIC 62 outputs a non-inverting clock, EMC_O, to the next module downstream.
  • FIG. 7 illustrates an ASIC series [0054] 72 (ASIC 72 a, 72 b, 72 c) and an ASIC series 74 (ASIC 74 a, 74 b, 74 c). ASIC series 72 is a collection of three connected ASIC modules where the CPU has control. Buffers 76 (shown in shaded color) are in use when the CPU has control. ASIC series 74 is a collection of three connected ASIC modules having addresses 0, 1, and 2. ASIC series 74 shows the state of operation where the CPU has addressed EM module 74 b and EM module 74 b responds and EM module 74 a passes data through to the CPU. Buffers 78 are used in this operation.
  • FIG. 8 provides a table [0055] 80 listing the ASIC mode according to the ID_BUF and ANA_TYPE values. EM SLAVE ASIC 62 has three modes of operation to support all types of expansion modules. The identification Register (ID_BUF) is input into the ASIC at initial power and its value is decoded by the ASIC to determine the mode of operation. The input signal, ANA_TYPE, is used to select between mode 1 or mode 2 operation when the ID_BUF has been decoded to be of an analog type.
  • EM [0056] SLAVE ASIC mode 0 provides eight discrete inputs and eight discrete outputs and does not require external registers. Mode 0 is referred to as the discrete mode.
  • In [0057] mode 0, the EXT0 port operates as an 8 bit data input port and EXT1 port operates as an active low, 8 bit data output port. The function of signals EXP0, EXP1, and EXP2, and EXP4 are mode dependent. In mode 0, signals EXP0, EXP1, and EXP2 are used for the watch dog timer function, described further below with respect to FIGS. 13-14.
  • EM [0058] SLAVE ASIC mode 1 provides a bus interface used by intelligent modules, analog modules with an on board microprocessor or modules requiring more than eight inputs and eight outputs. Mode 1 can be referred to as the bus interface mode.
  • The EXT[0059] 0 port operates as an active high, 8 bit bi-directional data port and EXT1 port consists of 8 bits of address and control. FIG. 9 includes a table 90 of the EXT1 address and control port in mode 1. The watch dog timer function can utilize signals EXP0, EXP1, and EXP2. The signal EXP4 is an input in mode 1 and can be referred to as WDTO. The watch dog timeout (WDTO) input is used on intelligent modules or a module containing a local processor. If the local processor's watch dog timer fires, then the WDTO signal becomes active high. The EM SLAVE ASIC responds to this input by returning all 1's to the PLC on any response message. For example, during a READ cycle, the EM SLAVE ASIC returns eight data bits of 1 and two parity bits of 1. The PLC recognizes a parity error on the READ data and does not process the information. The EM SLAVE ASIC allows modules downstream to communicate even when the WDTO has become active high. FIGS. 21 and 22 provide an example of a mode 1 Read and Write sequence and timing of these signals.
  • [0060] Mode 2 operation is specific to the non-intelligent analog modules and provides the required setup and control of a specific Analog to Digital Converter (ADC), Digital to Analog Converter (DAC), and Analog Input Multiplexer. The EXT0 bus is used as an 8 bit, active high, bi-directional data bus used to transmit and receive data with the DAC and ADC devices. The EXT1 bus is used to control the ADC and MUX devices and is illustrated in a table 100 of FIG. 10.
  • In [0061] mode 2, the signal EXP0, EXP1, EXP2, and EXP4 are used to control the DAC device and are illustrated in FIG. 2. Mode 2 operation follows a unique instruction sequence issued by the PLC to access the analog devices. A description of the PLC instruction sequence used in mode 2 is described further with respect to FIGS. 11 and 12. An illustration of the sequence and timing of these signals is described further with reference to FIGS. 24-31.
  • Referring now to FIG. 11, an analog input access sequence [0062] 110 is shown. Analog inputs are accessed in specific sequential instruction order by the PLC. If the PLC detects an error on any instruction during the sequence, then the PLC may re-try the failed instruction without having to start the sequence.
  • In a [0063] step 112, analog inputs are accessed from BANK 0 and the PLC selects a BANK 0 by writing the hex value 0 to register address 2 h (R2). In a step 114, BANK 0 has 4 MUX channels to select from and the PLC selects the MUX channel by writing any value to the most significant bit (MSB) location of the desired channel. In a step 116, ADC conversion is initiated by a PLC Write to the least significant bit (LSB) of the desired channel. In a step 118, after a specified amount of time, the PLC reads the MSB and a MSB read also resets the MUX device so that no inputs are selected. This is done in an attempt to reduce channel to channel crosstalk. In a step 119, the PLC Reads the LSB. The LSB Read transaction starts another ADC conversion, therefore the LSB value are stored in a temporary register in the ASIC. This allows the PLC to re-try the LSB Read again. A PLC Read of any one of the Status Registers or any Write transaction releases the temporary register.
  • Referring now to FIG. 12, an analog [0064] output access sequence 120 is shown. Analog outputs are accessed in specific sequential instruction order by the PLC. If the PLC detects an error on any instruction during the sequence, then the PLC may re-try the failed instruction without having to start the sequence over.
  • In a [0065] step 122, analog outputs are accessed from BANK 4. The PLC selects BANK 4 by writing the value 4 h to register address 2 h (R2). BANK 4 has up to four Analog Output Channels. In a step 124, the PLC selects the analog output channel by addressing the MSB of the desired channel. The MSB byte is written to the DAC during this transaction. In a step 126, the PLC then addresses the LSB of the desired channel. The LSB byte is written to the DAC and a short period later a DAC Load occurs.
  • The watch dog timer operation is now described in accordance with an exemplary embodiment. External pins EXP[0066] 0, EXP1, and EXP2 are used to implement the watch dog function in Modes 0 and 1. One purpose of the watch dog is to disable all discrete outputs in the event that the CPU fails to communicate with the expansion module over a specified period of time. The watch dog timer function is enabled when the ASIC is in mode 0 or 1 operation. The watch dog is reset by the occurrence of XOD or a valid ACK returned to the CPU. If neither of these events occur then all outputs are cleared after the watch dog has timed out. Once the watch dog has timed out it remains idle until either XOD is issued or a valid ACK is returned to the CPU. In mode 0, the outputs are cleared internal to the ASIC. In mode 1, the signal EXP0 is used to clear the external registers and is referred to as EXT_CLR. The control port EXT1 is set to all one's if the watch dog times out.
  • To implement the watch dog timer circuit, signal EXP[0067] 2 is used as watch dog clock input (CLK_IN). An external oscillator circuit, such as a LM555 timer circuit, drives the “analog schmitt trigger” clock input EXP2. The EM SLAVE ASIC does provide an inverted clock output signal, EXP1, that can be used for feedback into an external RC network in the case the LM555 timer circuit is not used. FIG. 13 illustrates an RC network circuit 130 that sets an oscillator period of approximately 590 μsec. The EM SLAVE ASIC is preset to 1200 counts and given the oscillator period of 590 μsec, the watch dog period is approximately 708 msec. FIG. 14 illustrates a timer circuit implementation 140.
  • The expansion module (EM) SLAVE ASIC operation is described according to an exemplary embodiment. The EM SLAVE ASIC implements a state machine architecture to provide proper communication and control. There are two types of messages the PLC provides to the EM SLAVE ASIC: a WRITE message and a READ message. The first byte of either message is the CONTROL byte with two bits a parity. The EM SLAVE ASIC decodes the CONTROL byte and determines which EM module the PLC is addressing, the message type (READ or WRITE) and the register being accessed. The EM SLAVE ASIC generates two bits of parity on the received CONTROL byte and compares their values to the parity bits attached to the CONTROL byte. If the parity bits do not compare then the EM SLAVE ASIC issues an active ASIC_XAS for approximately 2.2 μsec. The ASIC_XAS is transmitted to the next module downstream via XAOD signal, thus preserving the state of the outputs. [0068]
  • The second byte of a WRITE message is the WRITE data byte with two parity bits. The EM SLAVE ASIC generates parity on the WRITE data byte and compares this value to the parity received with the WRITE data byte. If the values do not equal, then the EM SLAVE ASIC responds to the PLC with an invalid Acknowledge (11). In the case the parity values do equal, then the EM SLAVE ASIC responds to the PLC with a valid Acknowledge (01) and the output data bus is updated with new data. The Acknowledge data is transmitted to the PLC on the rising clock edge. [0069]
  • The second byte of a READ message is a response to the PLC from the EM SLAVE ASIC and consists of a READ byte and two parity bits generated by the EM SLAVE ASIC. The EM SLAVE ASIC transmits the READ data byte and parity bits to the PLC on the rising clock edge. [0070]
  • At initial power up, the PLC issues an active XOD signal. Detection of XOD places the state machine into its home state and discrete outputs and analog outputs are cleared. Also at initial power up, the EM SLAVE ASIC determines its Module Address (MA_IN), Mode of operation ([0071] Mode 0, 1, or 2) and propagates the next Module Address (MA_OUT) by incrementing its Module Address by one. Once XOD is released, the EM SLAVE ASIC latches the module address, MA_IN. A bus transaction is initiated when an active XAS signal is sampled on the rising edge of the clock. The state machine transitions from its home state to state 0 when XAS is sampled true. The state machine is initialized when entering state 0 and propagates to state 1 on the next rising clock edge. If at any time the XOD signal becomes active, then all outputs are asynchronously reset and the state machine returns to its home state.
  • FIGS. [0072] 15-23 illustrate timing diagrams 150, 160, 170, 180, 190, 200, 210, 220, and 230 of EM SLAVE ASIC signals for various message types and conditions. Referring to FIG. 15, new data is enabled on the output port EXT1 on the rising edge of clock 21. In mode 0, EXT1 port is an active low output port.
  • In FIG. 16, input data to external port EXT[0073] 0 is enabled for one clock period and is registered internal to the ASIC on the falling edge of clock 12. The internal registered read data begins to serially shift out on the EMD signal on the rising edge of clock 13. The minimum register setup time is 10 nsec and the minimum hold time is 10 nsec.
  • Referring generally to FIG. 17 and FIG. 18, the parity generated on the control byte is compared to the parity attached to the control byte and the result registered on the falling edge of [0074] clock 10. In the case where a control byte parity error is detected, then the EM SLAVE ASIC generates its own XAS signal and becomes active low on the rising edge of clock 11 and remains low for nine clock periods. The ASIC signal ASIC_XAS is gated with CPU generated signals XAS and XOD. The resulting output, ASIC_XAOD, is used as the XAOD signal for the next module downstream. The purpose of the ASIC generated XAS signal is to preserve the I/O data of expansion modules downstream when a parity error has been detected on the control byte. The EM SLAVE ASIC samples the XAS input signal on clocks 0 and 12 only. If the EM SLAVE ASIC samples an active XAS on clock 12, then it returns to its home state thus preventing invalid data from being written to the outputs.
  • Referring to FIG. 19, the EM SLAVE ASIC responds to the CPU with an invalid Acknowledge and the EXT[0075] 1 data is not updated with new data when a parity has been detected on the Write data byte. A parity error on the Write data byte does not generate an active ASIC_XAS signal as a parity error on the control byte does.
  • The READ Message in FIG. 20 illustrates the EM SLAVE ASIC response when the CPU has addressed an EM with a higher physical address. The READ Byte is driven by the module downstream that was addressed. Signals EMD_TRI_EN and NEXT_EM_TRI_EN show the direction control of the EMD bi-directional data buffers. [0076]
  • Referring now to FIGS. [0077] 21-23, in mode 1, the EXT0 port is an active high bi-directional data port and EXT1 port is used as eight bits of control.
  • With reference to FIG. 23, expansion modules that have an on board processor have a watch dog time out signal. The EM SLAVE ASIC provides an input, WDTO or EXP[0078] 4, to monitor the state of the watch dog time out of the local processor. The EM SLAVE ASIC operates normally when WDTO is low. If the WDTO signal becomes high, the EM SLAVE ASIC responds to the CPU with all 1's during a Read Message response. This forces a parity error on the data read by the CPU, thus preventing the CPU from responding to invalid data. The EM SLAVE ASIC does not disable other modules that maybe connected to the system if the local processor has times out. In other words, the EM SLAVE ASIC responds appropriately to messages intended for other expansion modules even when the local processor has timed out.
  • The PLC accesses an analog input by issuing a specified sequence of instructions. FIGS. [0079] 24-28 illustrate timing diagrams of five exemplary instructions and show the timing requirements of the EM SLAVE ASIC in mode 2. The EM SLAVE ASIC allows the PLC to re-try any of the give instructions without having to start the sequence over.
  • Referring to FIG. 24, with the first instruction, the PLC selects [0080] bank 0 by writing 0 hex to register 2 or bank 1 by writing 1 hex to register 2. The EM SLAVE ASIC recognizes this to be the first instruction of an analog input sequence.
  • Referring to FIG. 25, with the second instruction, the PLC selects the input channel to read by writing any value to the MSB location of the desired input channel. The EM SLAVE ASIC decodes the message and causes the MUX to select the desired input channel. [0081]
  • Referring to FIG. 26, with the third instruction, the PLC initiates the Analog to Digital conversion by writing any value to the LSB of the desired channel. The EM SLAVE ASIC decodes this message and causes the ADC_BYTE_SEL signal to go low and the ADC_RD signal to pulse low. These two conditions cause the ADC to start the conversion. [0082]
  • Referring to FIG. 27, with the fourth instruction, the PLC reads the most significant bit (MSB) of the converted analog signal. The EM SLAVE ASIC addresses the MSB by setting ADC_BYTE_SEL high and enables the MSB onto the EXT[0083] 0 data bus on the falling edge of clock 10 and holding until the falling edge of clock 13. The EM SLAVE ASIC registers the MSB on the falling edge of clock 12 and begin shifting the new data back to the PLC on clock 13.
  • Referring to FIG. 28, with the last instruction, the PLC reads the least significant bit (LSB) of the converted analog signal. The EM SLAVE ASIC addresses the LSB by setting ADC_BYTE_SEL low and enables the LSB onto the EXT[0084] 0 data bus on the falling edge of clock 10 and holding until the falling edge of clock 13. The LSB is registered on the falling edge of clock 12 and begins shifting the new data back to the PLC on clock 13. The LSB Read instruction also causes the ADC to initiate a new conversion and therefore the LSB is placed in a temporary holding register internal to the ASIC. This allows the PLC to re-try the last instruction and receive valid data. The holding register is released on any Write transaction or any status register Read transaction.
  • The PLC accesses an analog output by issuing a specified sequence of instructions. FIGS. [0085] 29-31 illustrate timing diagrams of three exemplary instructions and show the timing requirements of the EM SLAVE ASIC in mode 2. The EM SLAVE ASIC allows the PLC to re-try any of the three instructions without having to start the sequence over.
  • Referring to FIG. 29, with the first instruction, the PLC selects [0086] bank 4 by writing 4 hex to register 2. The EM SLAVE ASIC recognizes this to be the first instruction of an analog output sequence.
  • Referring to FIG. 30, the PLC selects the analog output channel by writing to the MSB location of that channel. The MSB also is written to the digital to analog converter during this instruction. The ME SLAVE ASIC sets ADDR_DAC high on the rising edge of [0087] clock 16. The MSB is enabled onto the bus on the rising edge of clock 21 and is enabled into the DAC latch on the rising edge of clock 22. The MSB is latched into the DAC on the rising edge of clock 23.
  • Referring to FIG. 31, with the last instruction, the PLC addresses the LSB of the desired channel and write the LSB value to the digital to analog converter. The EM SLAVE ASIC pulls the ADDR_DAC signal low on the rising edge of [0088] clock 16. The LSB is enabled onto the EXZT0 data bus on the rising edge of clock 21 and enabled into the DAC latch on the rising edge of clock 22. The rising edge of WR_DAC—0 causes the DAC to latch the LSB and the rising edge of LD_DAC causes the digital to analog conversion
  • While the exemplary embodiments illustrated in the figures and described above are presently preferred, it should be understood that these embodiments are offered by way of example only. Other embodiments may include, for example, a variety of different smart cables. The invention is not limited to a particular embodiment, but extends to various modifications, combinations, and permutations that nevertheless fall within the scope and spirit of the appended claims. [0089]

Claims (20)

What is claimed is:
1. A method of preventing the writing out of invalid data by a communication interface that interfaces a controller and input/output (I/O) devices, the method comprising:
decoding a control byte in a message communicated from a controller to an application specific integrated circuit (ASIC), the control byte having parity bits;
determining which expansion module (EM) of a number of expansion modules is being addressed by the controller and what type of message is being communicated;
generating parity bits;
comparing the generated parity bits to the parity bits attached to the control byte; and
if the parity bits do not match, issuing a signal to preserve output states for the number of expansion modules.
2. The method of claim 1, wherein determining which expansion module (EM) of a number of expansion modules is being addressed by the controller and what type of message is being communicated further comprises determining which register is being accessed.
3. The method of claim 1, wherein the message communicated from a controller to an ASIC is a Write message.
4. The method of claim 1, wherein the message communicated from a controller to an ASIC is a Read message.
5. The method of claim 4, wherein a second byte of the Read message includes the parity bits generated by the ASIC.
6. The method of claim 1, further comprising, if the parity bits match, allowing the number of expansion modules to continue operation.
7. The method of claim 1, wherein the number of expansion modules is seven expansion modules connected together in a daisy chain fashion.
8. The method of claim 1, wherein the issued signal is an error detection signal transmitted to a next expansion module downstream.
9. The method of claim 1, wherein the issued signal is active for 2.2 μseconds.
10. A communication interface apparatus that responds to a communication protocol for interfacing expansion modules for reading and writing discrete input/output (I/O), analog I/O, intelligent module control and expansion module status, the apparatus comprising:
means for decoding a control byte in a message communicated from a controller, the control byte having parity bits;
means for determining which expansion module (EM) of a number of expansion modules is being addressed by the controller and what type of message is being communicated;
means for generating parity bits;
means for comparing the generated parity bits to the parity bits attached to the control byte; and
means for if the parity bits do not match, issuing a signal to preserve output states for the number of expansion modules.
11. The apparatus of claim 10, further comprising a first mode of operation that accommodates a first discrete input/out device.
12. The apparatus of claim 11, further comprising a second mode of operation that accommodates a bus interface used by modules requiring more than eight inputs and outputs.
13. The apparatus of claim 12, further comprising a third mode of operation that accommodates control of non-intelligent analog modules.
14. A system that provides serial communication to expansion modules to read and write discrete input/output, analog input/output, intelligent module control, and expansion module status, the system comprising:
state machine architecture that provides communication and control to a number of expansion modules; and
a controller that provides to the state machine architecture read messages and write messages, the first byte of the read messages and write messages including control information and parity bits,
wherein the state machine architecture is configured to:
decode the control information from the controller;
determine which of the number of expansion modules is being addressed by the controller and whether the message from the controller is a read or write message;
generate test parity bits;
compare the parity bits from the controller with the test parity bits; and
communicate an error detection signal to the number of expansion modules if the parity bits from the controller and the test parity bits do not match.
15. The system of claim 14, wherein the state machine architecture is implemented in an application specific integrated circuit (ASIC).
16. The system of claim 15, wherein the ASIC includes bi-directional buffers.
17. The system of claim 15, wherein the ASIC has three modes of operation: a first mode for discrete input/output having 8 inputs/outputs or less, a second mode for discrete input/output having more than 8 inputs/outputs, and a third mode for setup and control of non-intelligent analog modules.
18. The system of claim 17, wherein a watch dog function is implemented to disable all discrete outputs when the controller fails to communicate with one of the number of expansion modules over a period of time.
19. The system of claim 18, wherein the watch dog function is enabled during the first and second modes of operation.
20. The system of claim 14, wherein the error detection signal is communicated at least 2.2 μseconds.
US09/957,347 2001-03-21 2001-09-20 System for and method of interfacing expansion modules with programmable logic controllers (PLC) Expired - Lifetime US6839785B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US09/957,347 US6839785B2 (en) 2001-03-21 2001-09-20 System for and method of interfacing expansion modules with programmable logic controllers (PLC)
EP02078572A EP1296248A3 (en) 2001-09-20 2002-08-30 System for and method of interfacing expansion modules with programmable logic controllers (PLC)
CNB021436142A CN1311353C (en) 2001-09-20 2002-09-20 System and method for extending module with interface having programmable logic controller
CNA2006100958088A CN1920803A (en) 2001-09-20 2002-09-20 System for and method of interfacing expansion modules with programmable logic controllers (PLC)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US09/814,221 US6697903B2 (en) 2000-03-21 2001-03-21 Communication interface system, method and apparatus
US09/957,347 US6839785B2 (en) 2001-03-21 2001-09-20 System for and method of interfacing expansion modules with programmable logic controllers (PLC)

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US09/814,221 Continuation-In-Part US6697903B2 (en) 2000-03-21 2001-03-21 Communication interface system, method and apparatus

Publications (2)

Publication Number Publication Date
US20030023908A1 true US20030023908A1 (en) 2003-01-30
US6839785B2 US6839785B2 (en) 2005-01-04

Family

ID=25499454

Family Applications (1)

Application Number Title Priority Date Filing Date
US09/957,347 Expired - Lifetime US6839785B2 (en) 2001-03-21 2001-09-20 System for and method of interfacing expansion modules with programmable logic controllers (PLC)

Country Status (3)

Country Link
US (1) US6839785B2 (en)
EP (1) EP1296248A3 (en)
CN (2) CN1920803A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020188781A1 (en) * 2001-06-06 2002-12-12 Daniel Schoch Apparatus and methods for initializing integrated circuit addresses
CN103019147A (en) * 2011-09-20 2013-04-03 深圳市合信自动化技术有限公司 Programmable logic controller and expansion module thereof
CN104731007A (en) * 2015-03-13 2015-06-24 沈阳中科博微自动化技术有限公司 Backboard communication assembly and communication method for function security PLC
CN107577630A (en) * 2017-08-30 2018-01-12 武汉市敏控科技有限公司 A kind of expansion module automatic addressing system

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7443886B1 (en) * 2002-04-30 2008-10-28 Schneider Automation Inc. Communication protocol system and method
CN100354779C (en) * 2005-01-01 2007-12-12 胡瑞华 Programmable control module based on SCM
KR100666225B1 (en) * 2005-02-17 2007-01-09 삼성전자주식회사 Multi device system forming daisy chain and operating method for the same
US20060242611A1 (en) * 2005-04-07 2006-10-26 Microsoft Corporation Integrating programmable logic into personal computer (PC) architecture
CN100465839C (en) * 2005-12-28 2009-03-04 台达电子工业股份有限公司 Multi-mode communication interface for PLC expanding machine and host machine and method of use thereof
CN100451889C (en) * 2006-10-20 2009-01-14 艾默生网络能源有限公司 Programmable logical controller, its expanded module and its hardware expanding method
US8248984B2 (en) * 2007-06-20 2012-08-21 I Squared Llc System and method for interfacing devices
CN101797978B (en) * 2009-12-23 2014-04-16 中国航空工业集团公司第六三一研究所 Brake integrated controller of unmanned plane
US8188774B1 (en) * 2010-07-09 2012-05-29 Altera Corporation Apparatus and methods for activation of an interface on an integrated circuit
US8806085B2 (en) 2012-08-09 2014-08-12 Ge Intelligent Platforms, Inc. Application specific integrated circuit (ASIC) disposed in input/output module connectable to programmable logic controller (PLC) based systems having plurality of connection paths
CN102902227B (en) * 2012-09-17 2016-01-27 广州能迪能源科技股份有限公司 A kind of Circuits System for controlling external device
CN103048986B (en) * 2013-01-16 2016-06-22 广州市能迪自动化设备有限公司 The hospital of a kind of control circuit extension system and application thereof controls machine
KR101743836B1 (en) * 2015-10-22 2017-06-07 엘에스산전 주식회사 debugging method of programmable logic controller which uses general purpose microprocessor
CN108614491B (en) * 2018-06-11 2024-03-15 上海海得控制系统股份有限公司 Communication system and method for programmable logic controller

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5596716A (en) * 1995-03-01 1997-01-21 Unisys Corporation Method and apparatus for indicating the severity of a fault within a computer system
US6049894A (en) * 1995-02-22 2000-04-11 Adaptec, Inc. Error generation circuit for testing a digital bus
US6122747A (en) * 1997-09-05 2000-09-19 First Pass Inc. Intelligent subsystem interface for modular hardware system
US6654909B1 (en) * 2000-06-30 2003-11-25 Intel Corporation Apparatus and method for protecting critical resources against soft errors in high performance microprocessors
US6697903B2 (en) * 2000-03-21 2004-02-24 Siemens Energy & Automation Communication interface system, method and apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2618958B2 (en) * 1988-03-28 1997-06-11 株式会社東芝 Parity check controller
US5771247A (en) * 1994-10-03 1998-06-23 International Business Machines Corporation Low latency error reporting for high performance bus
KR100247012B1 (en) * 1997-05-15 2000-03-15 윤종용 Apparatus for correcting and controlling information of ststus in communication system
JP2000068862A (en) * 1998-08-19 2000-03-03 Fujitsu Ltd Error correction coder
CN1227574C (en) 1999-03-30 2005-11-16 西门子能量及自动化公司 Programmable controller method, system and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6049894A (en) * 1995-02-22 2000-04-11 Adaptec, Inc. Error generation circuit for testing a digital bus
US5596716A (en) * 1995-03-01 1997-01-21 Unisys Corporation Method and apparatus for indicating the severity of a fault within a computer system
US6122747A (en) * 1997-09-05 2000-09-19 First Pass Inc. Intelligent subsystem interface for modular hardware system
US6697903B2 (en) * 2000-03-21 2004-02-24 Siemens Energy & Automation Communication interface system, method and apparatus
US6654909B1 (en) * 2000-06-30 2003-11-25 Intel Corporation Apparatus and method for protecting critical resources against soft errors in high performance microprocessors

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020188781A1 (en) * 2001-06-06 2002-12-12 Daniel Schoch Apparatus and methods for initializing integrated circuit addresses
US6996644B2 (en) * 2001-06-06 2006-02-07 Conexant Systems, Inc. Apparatus and methods for initializing integrated circuit addresses
CN103019147A (en) * 2011-09-20 2013-04-03 深圳市合信自动化技术有限公司 Programmable logic controller and expansion module thereof
CN104731007A (en) * 2015-03-13 2015-06-24 沈阳中科博微自动化技术有限公司 Backboard communication assembly and communication method for function security PLC
CN107577630A (en) * 2017-08-30 2018-01-12 武汉市敏控科技有限公司 A kind of expansion module automatic addressing system

Also Published As

Publication number Publication date
CN1409220A (en) 2003-04-09
CN1920803A (en) 2007-02-28
EP1296248A2 (en) 2003-03-26
US6839785B2 (en) 2005-01-04
EP1296248A3 (en) 2010-08-18
CN1311353C (en) 2007-04-18

Similar Documents

Publication Publication Date Title
US6839785B2 (en) System for and method of interfacing expansion modules with programmable logic controllers (PLC)
US4984190A (en) Serial data transfer system
JP2757055B2 (en) Data transfer method for digital computer
EP0602667A1 (en) System and method for peripheral data transfer
JP2000029773A (en) Ram provided with latency synchronized with microprocessor and system provided with data processor, synchronous dram, peripheral devices and system clock
JPH02227765A (en) Data transfer apparatus for digital computer
JPH0713926A (en) Buffer control circuit and its operating method
JPH0577103B2 (en)
US6721810B2 (en) Universal controller expansion module system, method and apparatus
EP1145132A2 (en) Improved inter-device serial bus protocol
EP1275048B1 (en) Extended cardbus/pc card controller with split-bridge technology
US5287455A (en) ROM socket communication device for data transfer beween a host computer and a microprocessor based system
CA2403754C (en) A communication interface system, method and apparatus
US6738830B2 (en) Universal controller expansion module system, method and apparatus
US6510480B1 (en) Data transfer circuit and data processing method using data transfer circuit for handling interruption processing
KR880002509Y1 (en) Network interface circuit of computer
JP2004334551A (en) Serial communication system and local terminal for serial communication
RU2055392C1 (en) Device for serial-parallel interface
JP2692469B2 (en) Data controller
KR19980057564A (en) I / O controller with daisy chain structure
KR970007157Y1 (en) Interface apparatus between system bus and multiple parallel port
JP3027071B2 (en) Serial bus communication system
JP2994906B2 (en) Data receiving circuit
SU1557565A1 (en) Device for interfacing computer and terminals
JPH07319841A (en) Serial control device

Legal Events

Date Code Title Description
AS Assignment

Owner name: SIEMENS ENERGY & AUTOMATION, INC., GEORGIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MASSIE, MICHAEL R.;REEL/FRAME:012197/0288

Effective date: 20010920

STCF Information on status: patent grant

Free format text: PATENTED CASE

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 4

FEPP Fee payment procedure

Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

AS Assignment

Owner name: SIEMENS INDUSTRY, INC.,GEORGIA

Free format text: MERGER;ASSIGNOR:SIEMENS ENERGY AND AUTOMATION AND SIEMENS BUILDING TECHNOLOGIES, INC.;REEL/FRAME:024411/0223

Effective date: 20090923

Owner name: SIEMENS INDUSTRY, INC., GEORGIA

Free format text: MERGER;ASSIGNOR:SIEMENS ENERGY AND AUTOMATION AND SIEMENS BUILDING TECHNOLOGIES, INC.;REEL/FRAME:024411/0223

Effective date: 20090923

FPAY Fee payment

Year of fee payment: 8

FPAY Fee payment

Year of fee payment: 12