WO2020105173A1 - データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法 - Google Patents

データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法

Info

Publication number
WO2020105173A1
WO2020105173A1 PCT/JP2018/043198 JP2018043198W WO2020105173A1 WO 2020105173 A1 WO2020105173 A1 WO 2020105173A1 JP 2018043198 W JP2018043198 W JP 2018043198W WO 2020105173 A1 WO2020105173 A1 WO 2020105173A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
block
data control
signal
output
Prior art date
Application number
PCT/JP2018/043198
Other languages
English (en)
French (fr)
Inventor
孝也 中山
智 浮穴
Original Assignee
三菱電機株式会社
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
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to CN201880099582.XA priority Critical patent/CN113056711B/zh
Priority to JP2019528776A priority patent/JP6625278B1/ja
Priority to PCT/JP2018/043198 priority patent/WO2020105173A1/ja
Priority to US17/281,250 priority patent/US11275356B2/en
Priority to TW108122237A priority patent/TWI702799B/zh
Publication of WO2020105173A1 publication Critical patent/WO2020105173A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0259Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
    • G05B23/0264Control of logging system, e.g. decision on which data to store; time-stamping measurements
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/31From computer integrated manufacturing till monitoring
    • G05B2219/31001CIM, total factory control

Definitions

  • the present invention relates to a data control device, a programmable logic controller, and a data control method.
  • Patent Document 1 describes a technique in which an A / D conversion device mounted on a PLC (Programmable Logic Controller) stores digital signals obtained by AD (Analog to Digital) conversion in a built-in memory in time series. Have been described. According to this technique, since the A / D conversion device does not transmit a digital signal to another device, it is possible to collect data at a high speed in a short cycle equivalent to that of AD conversion.
  • PLC Programmable Logic Controller
  • the present invention has been made in view of the above circumstances, and an object of the present invention is to improve the convenience of processing regarding signals transmitted between devices and devices.
  • a data control device of the present invention is a data control device connected to a first device and a second device, the first input interface receiving a device signal from the first device, and a storage means.
  • the communication interface for receiving related information, and the digital value generated from the device signal in the plurality of storage areas.
  • a data control means for writing into the data control means the data control means acquiring a reference signal generated from an input signal input from the second device, and comparing means for comparing the value of the reference signal with the condition value.
  • Logger means for switching the storage area in which the digital value is written based on the comparison by the comparison means and writing the digital value.
  • the first input interface receives a device signal from the first device. Then, the comparison means compares the value of the reference signal with the condition value, and the logger means switches the storage area in which the digital value is written based on the comparison by the comparison means. Therefore, the storage area in which the digital value is written can be sorted according to the value of the reference signal. Therefore, it is possible to improve the convenience of processing regarding signals transmitted between the device and the device.
  • FIG. 3 is a diagram showing a configuration of a data control unit according to the first embodiment.
  • FIG. 3 is a diagram showing an example of drawing a logic circuit according to a second embodiment.
  • FIG. 6 is a diagram showing a configuration of a data control unit according to the third embodiment.
  • FIG. 8 is a diagram showing a drawing example of a logic circuit according to a third embodiment.
  • FIG. 16 is a diagram showing a drawing example of a logic circuit according to a seventh embodiment.
  • PLC system 1000 is a control system corresponding to a part of an FA system installed in a factory.
  • the PLC system 1000 is formed by connecting the devices forming the FA system with each other via a communication path.
  • the PLC system 1000 includes a PLC 100 that controls the devices 61, 62, 63, 64 installed on the production line, and a personal computer 50 that sets the operation of the PLC 100.
  • the personal computer 50 will be referred to as a PC 50.
  • the devices 61 to 64 are connected to the PLC 100.
  • the device 61 is an external device represented by an encoder and outputs a digital signal.
  • the digital signal output from the device 61 is input to the PLC 100.
  • the device 62 is an external device represented by a solenoid valve, and the digital signal output from the PLC 100 is input to the device 62.
  • the device 63 is an external device represented by a laser displacement sensor and outputs an analog signal.
  • the analog signal output from the device 63 is input to the PLC 100.
  • the device 64 is an external device represented by a control valve, and the analog signal output from the PLC 100 is input to the device 64.
  • the devices 61 to 64 will be collectively referred to as the device 60.
  • the device 60 is not limited to the encoder, the solenoid valve, the laser displacement sensor, and the control valve described above, and at least one of an analog signal output, an analog signal input, a digital signal output, and a digital signal input. Any device that has a function may be used.
  • the devices 61 and 63 may be sensors that observe a quantity represented by a flow rate, pressure and temperature and output a current value or a voltage value.
  • the PLC 100 is a control device that operates a production line by executing a program set by a user from the PC 50 and controlling the device 60.
  • the PLC 100 includes a CPU unit 10 that executes arithmetic processing and sends an instruction to the data control device 20, and a data control device 20 that operates according to an instruction from the CPU unit 10.
  • the data control device 20 includes a data control unit 210 that controls a signal input from the device 60 to the data control device 20 and a signal output from the data control device 20 itself to the device 60, and a storage unit 250 that stores data. , With.
  • the control of the signal input from the device 60 by the data control unit 210 includes logging data related to the signal in the storage unit 250.
  • the data control unit 210 obtains a digital signal by performing AD conversion on the analog signal continuously input from the device 60, and sequentially writes the digital values included in this digital signal in the storage unit 250. Then, the data control unit 210 switches the writing destination of the digital value from any one of the plurality of storage areas 251 and 252 included in the storage unit 250 to another area at high speed depending on the situation.
  • the encoder 61a which is an example of the device 61
  • the laser displacement sensor 63a which is an example of the device 63
  • the encoder 61a outputs a pulse signal corresponding to the angle
  • the laser displacement sensor 63a outputs an analog signal indicating the thickness.
  • the digital signal obtained by performing AD conversion on the analog signal is recorded in the storage area 251a which is an example of the storage area 251.
  • the recording destination is changed to the storage area 252a, which is an example of the storage area 252, and the recording of the digital signal is continued without interruption of the recording. ..
  • the recording destination is switched based on the comparison between the reference signal indicating the pulse count result and the threshold value.
  • the PLC 100 realizes various control processes not limited to the logging process as shown in FIG. 2 according to the setting from the PC 50.
  • the configuration of the PLC 100 for implementing various control processes will be described with reference to FIG.
  • the CPU unit 10 and the data control device 20 of the PLC 100 are connected via a communication bus 30 and communicate with each other.
  • the CPU unit 10 corresponds to an arithmetic processing unit that constitutes the PLC 100, and executes the ladder program 112.
  • the ladder program 112 is a program for operating each device included in the PLC 100 to control an industrial device.
  • the control by executing the ladder program 112 may include control of a device (not shown) in addition to control of the data control device 20.
  • the CPU unit 10 repeatedly executes the execution of the ladder program 112, the output of the execution result of the ladder program 112, and the acquisition of the value used by the ladder program 112, in a predetermined cycle.
  • This cycle is called a control cycle or scan time, which is a time on the order of milliseconds. In other words, the length of this cycle is typically 1 millisecond or more.
  • the CPU unit 10 includes a memory 11 that stores a preset parameter 111 and a ladder program 112, and an arithmetic unit 12 that executes the ladder program 112 according to the parameter 111 stored in the memory 11. , A PC interface 13 for communicating with the PC 50, and a communication interface 14 for communicating with the data control device 20 via the communication bus 30.
  • the memory 11 is a non-volatile memory and corresponds to, for example, a semiconductor flash memory or a magnetic disk.
  • the arithmetic unit 12 has a CPU and a RAM serving as a work area of the CPU.
  • the PC interface 13 includes, for example, a USB (Universal Serial Bus) interface circuit.
  • the communication interface 14 has a communication interface circuit for communicating with the data control device 20.
  • the data control device 20 corresponds to an input / output control unit or an I / O (Input / Output) unit of the PLC 100 that is used by being attached to the CPU unit 10.
  • the data control device 20 controls data included in a digital signal input / output between the data control device 20 and the device 60 and data related to an analog signal.
  • the data control device 20 may control the device 60 by controlling the data of the signal output from the data control device 20.
  • the data control device 20 includes a digital signal input interface 241 that receives a digital signal, a digital signal output interface 242 that transmits a digital signal, and an analog signal that receives an analog signal, in addition to the data control unit 210 and the storage unit 250 described above.
  • the digital signal input interface 241 outputs the digital signal input from the device 61 to the data control unit 210.
  • the digital signal output interface 242 outputs the digital signal input from the data control unit 210 to the device 62.
  • the analog signal input interface 243 outputs the analog signal input from the device 63 to the data control unit 210.
  • the analog signal input interface 243 is an example of a first input interface that receives a device signal from the device 63 connected to the data control device 20 as the first device.
  • the device signal means a signal from the device 60 that outputs a value to be recorded.
  • the analog signal output interface 244 outputs the analog signal input from the data control unit 210 to the device 64.
  • the data control unit 210 is a hardware reconfigurable integrated circuit and corresponds to a so-called PLD (Programmable Logic Device).
  • the data control unit 210 operates at high speed on the order of nanoseconds by parallel processing.
  • the data control unit 210 functions as a data control unit that writes a digital value generated from an analog signal in any of the plurality of storage areas 251 to 252 among the constituent elements of the data control device 20.
  • the data control unit 210 includes a plurality of general-purpose circuit blocks and a circuit-block switching bus 230 that is a communication path capable of changing at least one of the combination and use order of the general-purpose circuit blocks.
  • the data control unit 210 includes, as general-purpose circuit blocks, a digital input block 211 to which a digital signal is input from the digital signal input interface 241, and a digital output block 212 that outputs a digital signal to the digital signal output interface 242.
  • An AD conversion block 213 for converting an analog signal received by the analog signal input interface 243 into a digital signal
  • a DA conversion block 214 for generating an analog signal to be supplied to the analog signal output interface 244, a counter block 221 for counting a numerical value
  • a cam switch block 222 that switches and outputs an output value according to an input value
  • a logger block 223 that logs an input value
  • a waveform output block 224 that outputs an analog waveform
  • a data comparison process It has a comparison operation block 225 to perform, a logic operation block 226 to perform a logic operation, a four arithmetic operation block 227 to perform four arithmetic operations, and a filter block 228 to filter a signal.
  • Each general-purpose circuit block has a register for storing execution parameters used for processing to be executed, and a data input / output terminal for inputting / outputting data.
  • the digital input block 211 has a register 211a and a terminal 211b.
  • the digital output block 212 has a register 212a and a terminal 212b.
  • the AD conversion block 213 has a register 213a and a terminal 213b.
  • the DA conversion block 214 has a register 214a and a terminal 214b.
  • the counter block 221 has a register 221a and a terminal 221b.
  • the cam switch block 222 has a register 222a and a terminal 222b.
  • the logger block 223 has a register 223a and a terminal 223b.
  • the waveform output block 224 has a register 224a and a terminal 224b.
  • the comparison operation block 225 has a register 225a and a terminal 225b.
  • the logical operation block 226 has a register 226a and a terminal 226b.
  • the four arithmetic operation block 227 has a register 227a and a terminal 227b.
  • the filter block 228 has a register 228a and a terminal 228b.
  • the digital input block 211 receives a digital signal input from the digital signal input interface 241 according to the execution parameter registered in the register 211a, and outputs the digital signal from the terminal 211b to the outside of the general-purpose circuit block or the data control unit 210. .. Further, the digital output block 212 receives a digital signal from the outside of the general-purpose circuit block or the data control unit 210 via the terminal 212b according to the execution parameter registered in the register 212a, and outputs the digital signal to the digital signal output interface 242. Output.
  • the AD conversion block 213 corresponds to a so-called AD conversion circuit, and is an example of AD conversion means for converting an analog signal into a digital signal indicating a digital value.
  • the AD conversion block 213 is obtained by converting the analog signal supplied from the analog signal input interface 243 by discretizing and quantizing the analog signal with a predetermined sampling period and resolution according to the execution parameter registered in the register 213a.
  • the digital signal is output to the outside of the general-purpose circuit block or the data control unit 210.
  • the AD conversion block 213 may continuously output a 16-bit digital value corresponding to the level of the analog signal in the range of ⁇ 10 V to +10 V to output a digital signal that is a series of this digital value. Specified by execution parameters.
  • the DA conversion block 214 corresponds to a so-called DA conversion circuit.
  • the DA conversion block converts the analog signal obtained by converting the digital signal supplied from the outside of the general-purpose circuit block or the data control unit 210 via the terminal 214b according to the execution parameter registered in the register 214a to the analog signal output interface 244. Output to.
  • the execution parameter defines that the DA conversion block 214 changes the level of the analog signal within the range of ⁇ 10 V to +10 V and outputs it, corresponding to the sequentially input digital value of 16 bits.
  • the counter block 221 outputs the result obtained by counting the signal input from the terminal 211b according to the execution parameter registered in the register 221a from the terminal 211b.
  • the cam switch block 222 outputs an output value corresponding to the input value input to the terminal 222b from the terminal 222b according to the execution parameter registered in the register 222a.
  • the logger block 223 outputs the value input from the terminal 223b to the storage unit 250 via the terminal 223b according to the execution parameter registered in the register 223a, and logs the data.
  • the waveform output block 224 sequentially outputs the digital values read from the storage unit 250 from the terminal 224b according to the execution parameters registered in the register 224a. A digital signal formed by this digital value is AD-converted and output to the outside of the data control device 20.
  • the comparison operation block 225 compares the value of the data input from the terminal 225b according to the execution parameter registered in the register 225a, and outputs the comparison result from the terminal 225b.
  • the logical operation block 226 performs a basic logical operation on the value input from the terminal 226b according to the execution parameter registered in the register 226a, and outputs the execution result from the terminal 226b.
  • This logical operation includes, for example, a logical NOT, a logical product, a logical sum, an exclusive logical sum, a negative logical sum, and a negative logical product of the bit data input from the terminal 226b.
  • the four arithmetic operation block 227 executes the four arithmetic operations of the value input from the terminal 227b according to the execution parameter registered in the register 227a, and outputs the execution result from the terminal 227b.
  • the four arithmetic operations include, for example, addition, subtraction, multiplication, and division of 16-bit word data.
  • the filter block 228 executes filtering processing according to the execution parameters registered in the register 228a.
  • the execution parameter defines that the filter block 228 outputs the average value of the values continuously input to the terminal 228b as a moving average from the terminal 228b.
  • the filter block 228 is used to remove noise in the input signal, for example.
  • the storage unit 250 includes a volatile semiconductor flash memory.
  • the storage unit 250 is preferably a storage that can realize high-speed reading and writing as described later.
  • the storage unit 250 functions as a storage unit having storage areas 251 to 252 for storing the data output from the data control unit 210. Although two storage areas 251 and 252 included in the storage unit 250 are representatively shown in FIG. 3, the number of areas is not limited to two and may be more than two.
  • the data capacity of the storage unit 250 is, for example, 10 MByte, 1 GByte, or 1 TByte.
  • the capacity of the storage areas 251 to 252 is, for example, 1 MByte, but may be arbitrarily changed.
  • the communication interface 260 includes an interface circuit for communicating via the communication bus 30.
  • the internal memory 270 includes a volatile semiconductor flash memory.
  • the internal memory 270 is preferably a storage that responds to the high speed internal processing of the data control unit 210 at a somewhat high speed.
  • the internal memory 270 stores operating parameters. This operation parameter is information that defines the order for operating the general-purpose circuit blocks in combination. Further, the internal memory 270 may store information for defining the operation of the data control unit 210 together with the operation parameter, as will be described later. These pieces of information are written in the internal memory 270 from the PC 50 via the CPU unit 10.
  • the arithmetic unit 280 reconfigures a plurality of general-purpose circuit blocks included in the data control unit 210 based on the operation parameters stored in the internal memory 270. Specifically, the calculation unit 280 analyzes the operation parameters stored in the internal memory 270 and determines at least one of the combination of general-purpose circuit blocks, the order of use, and the operation content. Then, the arithmetic unit 280 writes the execution parameter in the registers 211a, 212a, 213a, 214a, 221a, 222a, 223a, 224a, 225a, 226a, 227a, 228a of the general-purpose circuit block to determine the operation determined by the data control unit. 210 is realized. Further, the calculation unit 280 automatically determines the data acquired by the data control unit 210.
  • the non-volatile memory 290 includes a magnetic memory or a semiconductor flash memory.
  • the non-volatile memory 290 stores the same data as the storage unit 250 and the internal memory 270 in preparation for power-off of the data control device 20.
  • the data stored in the non-volatile memory 290 is expanded in the storage unit 250 and the internal memory 270 so that the data before and after the power is turned off is stored.
  • the data in the section 250 and the internal memory 270 are kept consistent.
  • the PC 50 includes an engineering tool 51 for creating the ladder program 112, various settings, and monitoring the state of the PLC 100, and a communication interface 52 for communicating with the CPU unit 10. Have.
  • the engineering tool 51 is a function implemented by the PC 50 executing software as a tool for the user to set the PLC 100.
  • the engineering tool 51 has a logic circuit creation tool 500 for setting the operation of the data control device 20.
  • the logic circuit creation tool 500 includes logic circuit data 511 indicating the drawing contents and settings of the hardware logic circuit that defines the operation of the data control device 20, an area switching table 521 and an area pointer for switching the storage area of the storage unit 250.
  • a table 522 is generated.
  • the logic circuit data 511 is converted into operation parameters 512 by the logic circuit creation tool 500. Then, the logic circuit creation tool 500 stores the operation parameter 512, the area switching table 521, and the area pointer table 522 in the internal memory 270 of the data control device 20 from the CPU unit 10 via the communication bus 30.
  • Each of the logic circuit data 511 and the operation parameter 512 constitutes setting information 510 indicating the setting of the operation content of the data control unit 210.
  • FIG. 5 shows an example in which the setting information 510 is equal to the logic circuit data 511 and the operation parameter 512, but the present invention is not limited to this.
  • the logic circuit data 511 generated by the logic circuit creation tool 500 may be combined with other data as the setting information 510.
  • the area switching table 521 and the area pointer table 522 constitute related information 520 that associates the value of the reference signal that serves as a reference for switching the storage area with the address of the storage area.
  • the related information 520 is information indicating an address of each of the storage areas 251 to 252 included in the storage unit 250 and a condition value described later associated with the storage areas 251 to 252.
  • the communication interface 260 of the data control device 20 receives the setting information 510 and the related information 520, and the arithmetic unit 280 stores the information in the internal memory 270.
  • FIG. 6 illustrates the drawing contents of the logic circuit set by the user using the logic circuit creating tool 500.
  • the analog signal output from the device 63 is input to the AD conversion block 213, and the signal output from the terminal 213b of the AD conversion block 213 is input to the terminal 223b of the logger block 223.
  • the AD conversion block 213 continues to sequentially output the digital value to the logger block 223 in synchronization with the internal control clock of the data control unit 210 at a cycle of nanosecond order.
  • the pulse signal output from the device 61 is input to the digital input block 211, and the signal output from the terminal 211b of the digital input block 211 is input to the terminal 221b of the counter block 221. It functions as a counter unit that counts the number of rising edges of the pulse and outputs a signal indicating the count result of the pulse.
  • the counting and the output of the counting result by the counter block 221 are executed in a cycle of nanosecond order in synchronization with the internal control clock of the data control unit 210.
  • the count result by the counter block 221 is input from the terminal 221b of the counter block 221 to the terminal 222b of the cam switch block 222, and the cam switch block 222 outputs a value corresponding to the count result from the terminal 222b to the terminal 223b of the logger block 223. Output to.
  • the user arranges objects corresponding to the respective general-purpose circuit blocks while visually recognizing a screen equivalent to the logic circuit creation tool 500 in FIG. 6, and connects the objects with each other by a line indicating a signal line, Draw a logic circuit.
  • the logic circuit is set as shown in FIG. 6, a combination of the AD conversion block 213, the logger block 223, the digital input block 211, and the counter block 221 and a signal path corresponding to the order of processing by these blocks.
  • the logic circuit data 511 is generated.
  • the logic circuit creation tool 500 converts the logic circuit data 511 into operation parameters 512 and transmits the operation parameters 512 from the CPU unit 10 to the data control device 20 via the communication bus 30.
  • the operating parameters 512 received by the data controller 20 are stored in the internal memory 270 as shown in FIG.
  • the user registers the area switching table 521 in the cam switch block 222 and the area pointer table 522 in the logger block 223.
  • the area switching table 521 is a step number serving as an index for associating the condition value with which the input value is compared, the area number for identifying the storage area, and the condition value and the area number. And, including.
  • the step number “1” is an index that associates the condition value “2000” with the area number “252”.
  • the area numbers corresponding to the storage areas 251, 252 are equal to the reference numerals of the storage areas 251, 252.
  • the cam switch block 222 acquires a reference signal and compares the value of the reference signal with the condition value. Functions as a means. Specifically, the cam switch block 222 reads the area switching table 521 of the internal memory 270 and compares the value output from the counter block 221 with the condition value. Then, the cam switch block 222 outputs a signal indicating the area number based on this comparison. Specifically, the cam switch block 222 outputs the region number associated with the smallest value larger than the input value from the counter block 221 among the plurality of condition values.
  • the area number “251” associated with the condition value “1000” is output, and if the input value is in the range of 1000 to 1999, the condition value is The area number “252” associated with “2000” is output. In FIG. 6, it is indicated by a broken line that the area number “252” corresponding to the current step number “1” is output.
  • the area pointer table 522 associates an area number common to the area switching table 521, a start address that is a physical address of each storage area, and the number of data points that can be stored in the storage area. It is table data.
  • the logger block 223 switches the storage area in which the digital value is written based on the comparison by the cam switch block 222 to change the digital value.
  • the logger block 223 reads the area pointer table 522 of the internal memory 270, and sequentially outputs the digital value output from the AD conversion block 213 to the storage area corresponding to the area number output from the cam switch block 222.
  • the logger block 223 sequentially stores digital values in an area that can store 10000 pieces of data from the address “30000”.
  • the logger block 223 switches the storage area for storing the digital value to the area corresponding to the new area number.
  • This switching can be repeatedly executed at the logging cycle set by the execution parameter of the register 223a.
  • the logging cycle may be synchronized with the internal control clock itself of the data control unit 210, or may be several times to several tens of times longer than this clock, but the logging time depends on the scan time of the CPU unit 10. Set significantly shorter. That is, since the area is switched in a cycle close to the cycle in which the AD conversion is executed by the AD conversion block 213, the storage area is switched at high speed and logging of the digital value is continued without dropping the digital value obtained by the AD conversion. be able to.
  • the write processing is achieved by the general-purpose circuit blocks executing the processing in synchronization with the internal control clock.
  • the AD conversion block 213 executes AD conversion of an analog signal input from the device 63 and output of a digital value in synchronization with the internal control clock.
  • the digital input block 211 outputs the pulse signal input from the device 61 to the counter block 221 in synchronization with the internal control clock.
  • the counter block 221 outputs the result of counting the rising edges of the pulses included in the pulse signal to the cam switch block in synchronization with the internal control clock.
  • the cam switch block 222 acquires a reference signal (step S10).
  • the reference signal is a signal referred to for switching the storage area, and in the example shown in FIG. 6, the signal indicating the count result output from the counter block 221 corresponds to the reference signal.
  • the cam switch block 222 compares the value of the reference signal with the condition value (step S11). Specifically, the cam switch block 222 compares the value of the reference signal with each of the plurality of condition values included in the area switching table 521. However, the cam switch block 222 may perform comparison with any one condition value without comparing with each of the plurality of condition values. For example, in the example shown in FIG. 7, when the value of the reference signal is in the range from zero to 999, the condition value is compared with “1000”, and when the value of the reference signal is 1000, the condition is compared. The value may be changed to "2000".
  • the cam switch block 222 outputs the area number based on the comparison (step S12). Specifically, the cam switch block 222 outputs, to the logger block 223, the area number corresponding to the minimum value of the condition values that is larger than the value of the reference signal. Then, the cam switch process ends.
  • the above cam switch process is repeatedly executed in synchronization with the internal control clock.
  • the numbers and the transition of are shown.
  • the counter block 221 continues counting the rising edge of the pulse signal and incrementing the count value.
  • the cam switch block 222 compares the count value with the condition value of the area switching table 521, and when the counter value is equal to or more than the condition value, switches the step number to the next larger number. For example, when the count value is 2999, the cam switch block selects the step number "1" and outputs the area number "252".
  • the next counter value “3000” is sent from the counter block 221, as a result of comparing this counter value with the condition value, the step number shifts to “2” and the area number switches to “253”. ..
  • FIG. 11 shows logger processing by the logger block 223.
  • the logger block 223 acquires the area number and the data to be written (step S20). Specifically, the logger block 223 is the area number output from the cam switch block 222 and reaching the terminal 223b, and the write target data output from the AD conversion block 213 and reaching the terminal 223b. Simultaneously capture digital value and.
  • the logger block 223 determines whether or not the area number output from the cam switch block 222 has changed (step S21). Specifically, the logger block 223 determines whether the area number acquired in step S20 is different from the area number at the time when the logger block 223 previously wrote data. When it is determined that the area number has not changed (step S21; No), the logger block 223 shifts the processing to step S24.
  • the logger block 223 clears the relative pointer and the number of logging data (step S22).
  • the relative pointer is a pointer indicating a relative position where a digital value is stored in one storage area, and indicates an offset from the start address.
  • the number of logging data indicates the number of digital values continuously written in one storage area. If the determination in step S21 is affirmative, the storage area in which the digital value is written is changed, so the logger block 223 sets the relative pointer and the number of logging data to zero.
  • the logger block 223 acquires from the area pointer table 522 the start address corresponding to the area number determined to have been changed in step S21 (step S23).
  • the logger block 223 identifies the writing position of the digital value by adding the relative pointer to the start address (step S24). Specifically, the logger block 223 identifies the physical address of the write destination by adding a relative pointer to the start address of the storage area that is the current write target.
  • the logger block 223 writes the data in the position specified in step S24 (step S25). Specifically, the logger block 223 stores the digital value acquired from the AD conversion block 213 in the address specified in step S24.
  • the logger block 223 adds 1 to the number of logging data (step S26) and 1 to the number of relative pointers (step S27).
  • the logger block 223 determines whether the current relative pointer has reached the end of the storage area (step S28). Specifically, the logger block 223 refers to the area pointer table 522 and determines whether or not the value obtained by subtracting 1 from the number of data points of the storage area that is the current writing target is equal to the relative pointer. For example, in the example shown in FIG. 8, when digital values are sequentially stored in the storage area 252, the logger block 223 determines whether or not the relative pointer is “9999”.
  • the logger block 223 ends the logger processing.
  • the logger block 223 determines whether the ring buffer is valid (step S29). Specifically, the logger block 223 refers to the register 223a and determines whether the flag indicating whether the storage area is treated as a ring buffer is in the ON state or the OFF state.
  • the ring buffer may be set by the logic circuit data 511 instead of the register 223a, or may be set for each storage area in the area switching table 521 or the area pointer table 522.
  • the logger block 223 clears the relative pointer and sets its value to zero (step S30).
  • the logger process is executed again without changing the storage area after the digital value has been written to the end of the storage area, the digital value is rewritten in order from the start address of this storage area, and the data Will be stored repeatedly. Then, the logger process ends.
  • the logger block 223 determines that logging is completed (step S31), and ends writing to this storage area. Note that the logger block 223 may continue writing to another storage area or may end the writing. Further, the logger block 223 may notify the PC 50 via the CPU unit 10 that the logging has been completed. Then, the logger process ends.
  • the logged data is used by the ladder program 112.
  • the logged data may be displayed to the user, referred to in other processing, or transferred to the PC 50.
  • the above logger processing is repeatedly executed at the logging cycle set by the execution parameter of the register 223a.
  • the analog signal input interface 243 receives an analog signal which is a device signal from the device 63 as the first device, and the AD conversion block 213 converts the analog signal into a digital signal indicating a digital value. To do. Then, the device 61 as the second device outputs a pulse signal as an input signal to the data control device 20.
  • the cam switch block 222 acquires the reference signal generated from this pulse signal, compares the count value as this reference signal with the condition value of the area switching table 521, and the logger block 223 stores the digital value. The area is switched based on the comparison by the cam switch block 222. Therefore, the storage area in which the digital value is written can be sorted according to the value of the reference signal. Therefore, it is possible to improve the convenience of processing regarding the analog signal output from the device 63.
  • the data control device 20 performs nanosecond processing by hardware processing according to the value of the reference signal generated from the input signal without being affected by the scan time or the program processing speed of the CPU unit 10. Logging can be continued by switching the storage area at high speed on the order.
  • the data control device 20 includes a digital signal input interface 241 as a second input interface that receives an input signal from the device 61.
  • This input signal is a pulse signal.
  • the data control unit 210 has a counter block 221 that counts the number of pulses included in this pulse signal and outputs a reference signal indicating the count result. Thereby, the data control device 20 can switch the storage area according to the state of the pulse signal.
  • the logger block 223 switches the storage area in which the digital value is written to the storage area of the address associated with the smallest value larger than the reference signal value among the condition values. Therefore, the cam switch block 222 does not need to compare the value of the reference signal with all the condition values, and the processing load can be reduced.
  • the logger block 223 may treat the storage area as a ring buffer or as a non-ring buffer regardless of the execution parameter.
  • the ring buffer setting may be omitted from the setting items of the logic circuit creation tool 500.
  • the comparison operation block 225 or the logic operation block 226 may perform these comparisons and determinations, and the operation unit 280 performs these operations. May be compared and determined.
  • the comparison calculation block 225 compares the magnitude of the value output from the counter block 221 with the magnitude of the value output from the cam switch block 222, and obtains data indicating whether the latter is greater than the cam switch block.
  • the output to 222 may be defined by the execution parameter.
  • Embodiment 2 Next, the second embodiment will be described focusing on the differences from the above-described first embodiment.
  • symbol is used and the description is abbreviate
  • the storage area is switched according to the state of the pulse signal, but an example in which the storage area is switched according to the state of the analog signal different from the logging target is also conceivable.
  • a mode in which the storage area is switched according to the level of the analog signal will be described.
  • FIG. 12 illustrates the drawing contents of the logic circuit set by the user using the logic circuit creating tool 500.
  • the data control device 20 receives the analog signal output from the device 65. Specifically, the data control device 20 is connected to the devices 63 and 65, and the analog signal input interface 243 outputs the analog signal input from each of the devices 63 and 65 to the data control unit 210. Then, as shown in FIG. 12, the analog signal output from the device 65 is input to the AD conversion block 213, and the digital signal output from the terminal 213 b of the AD conversion block 213 is input to the terminal 222 b of the cam switch block 222. To be done.
  • the cam switch block 222 and the logger block 223 operate similarly to the first embodiment.
  • the data control device 20 has the same effect as that of the first embodiment. .. Specifically, the data control device 20 includes an analog signal input interface 243 that receives an analog signal as an input signal from the device 65.
  • the AD conversion block 213 also generates a reference signal by converting the analog signal into a digital signal as a reference signal. Specifically, the AD conversion block 213 converts the level of the analog signal from the device 63, which is a device signal, into a digital value, and converts the analog signal from the device 65, which is an input signal, into a digital signal as a reference signal. To do. Then, the data control device 20 can switch the storage area according to the state of the analog signal from the device 65.
  • Embodiment 3 Next, the third embodiment will be described focusing on the differences from the above-described first embodiment.
  • symbol is used and the description is abbreviate
  • the storage area is switched according to the input signal input from the outside, but an example in which the reference signal for switching the storage area is generated inside the data control device 20 is also conceivable.
  • a mode in which the data control device 20 switches the storage area at the timing generated by the internal clock will be described.
  • FIG. 13 shows an example including a clock block 229 instead of the filter block 228 of FIG. 4 as the configuration of the data control unit 210 according to the present embodiment.
  • the clock block 229 generates a clock signal, supplies the clock signal to the general-purpose circuit block, and functions as an internal control clock of the data control unit 210.
  • the period of the clock signal is on the order of nanoseconds, specifically, 1 to 10 nanoseconds.
  • the clock block 229 is omitted in FIG. 4, it may be included in the data control unit 210 according to the first and second embodiments.
  • the clock block 229 has a register 229a and a terminal 229b.
  • the clock block 229 outputs a clock signal from the terminal 229b according to the execution parameter registered in the register 229a.
  • FIG. 14 illustrates the drawing contents of the logic circuit set by the user using the logic circuit creating tool 500.
  • the function of a ring counter that operates in a cycle desired by the user is set.
  • the counter block 221 counts the clocks of the clock block 229.
  • the counter block 221 counts up or counts down the ring counter, and outputs the count value from the terminal 221b.
  • the output count result is input to the cam switch block 222 from the terminal 221b.
  • the cam switch block 222 and the logger block 223 operate similarly to the first embodiment.
  • the counter block 221 counts the period of the periodic signal generated by the clock block 229 from a certain time and outputs the reference signal indicating the count result. Then, the cam switch block 222 compares the count result with the condition value, and the logger block 223 switches the storage area based on this comparison and continues logging. With this, the nanosecond cycle timing desired by the user is generated separately from the input from the outside, and the user sets the condition value of the area switching table 521, so that the storage area can be stored with high accuracy and flexibility. It becomes possible to switch.
  • the fourth embodiment will be described focusing on the differences from the above-described first embodiment.
  • symbol is used and the description is abbreviate
  • the storage area is switched according to the value of the reference signal.
  • the user can directly specify the storage area to more flexibly achieve the logging desired by the user. Conceivable.
  • a mode in which the writing area is changed by a direct instruction from the user will be described.
  • the data control device 20 has a shared memory 291 shared with the CPU unit 10.
  • the shared memory 291 includes a semiconductor flash memory.
  • the shared memory 291 may be volatile or non-volatile, but it is preferable that the shared memory 291 is a storage that responds at a somewhat high speed in accordance with the high-speed internal processing of the data control unit 210.
  • the shared memory 291 can be written and read by the data control unit 210 and the arithmetic unit 280 of the data control device 20, and can be written and read by the CPU unit 10 without complicated communication processing.
  • FIG. 16 illustrates the drawing contents of the logic circuit set by the user using the logic circuit creating tool 500.
  • the cam switch block 222 is operated from the CPU unit 10 that executes the ladder program 112. Specifically, an external operation switching signal is input from the ladder program 112 to the terminal 222d of the cam switch block 222. Upon receiving this signal, the cam switch block 222 cuts off the count value input to the terminal 222c and skips the process of collating the count value with the area switching table 521.
  • the terminals 222c and 222d correspond to the terminal 222b shown in FIG.
  • the cam switch block 222 connects the active step number to a specific address in the shared memory 291.
  • the active step number means the step number corresponding to the output area number.
  • the concatenation of the step number and the address means that the step number is synchronized with the value stored in the address.
  • the CPU unit 10 stores the instruction value from the user at the above address of the shared memory 291.
  • the value of the above address in the shared memory 291 is forcibly rewritten by the ladder program 112 when the external operation switching signal is input to the terminal 222c of the cam switch block 222, this value is immediately transferred to the cam switch block 222. Reflected. Then, the cam switch block 222 outputs the step number written in the shared memory 291 and the corresponding area number in the area switching table 521.
  • the area number is designated by the CPU unit 10 and the storage area in which the data is written is designated. Then, the logger block 223 switches the storage area in which the digital value is written to the area indicated by the instruction value from the user. Specifically, the communication interface 260 shown in FIG. 3 receives the step number as the instruction value instructed by the user, and the logger block 223 writes the storage area for writing the digital value in the area corresponding to this step number. Switch to. As a result, the user can directly operate the active step number in the cam switch block 222 to specify the storage area at the timing desired by the user.
  • the instruction value from the user is not limited to the step number and may be the area number.
  • the logger block 223 may refer to the shared memory 291.
  • the logger block 223 cuts off the input from the cam switch block 222 when the external operation switching signal is input, and acquires the area number or address stored in the shared memory 291. To do. Then, the logger block 223 may write the digital values in order from the head address or the acquired address corresponding to the acquired area number and the area pointer table 522.
  • Embodiment 5 Next, the fifth embodiment will be described focusing on the differences from the first embodiment described above. In addition, about the same or equivalent structure as the said Embodiment 1, the same code
  • the storage area in which the data is written is switched in the first embodiment, an example in which the storage area in which the data is read is switched is also conceivable.
  • a mode will be described in which storage areas from which digital values are sequentially read are switched and analog signals are output from these digital values by DA conversion.
  • a signal output from PLC 100 to device 60 will be referred to as an output signal as appropriate.
  • the input signal input from the device 60 to the PLC 100 is used to switch the storage area from which the digital value is read.
  • the logic circuit creation tool 500 includes a logic circuit data 511 and a region switching table 521 and a region pointer table 522 for switching a storage region in which data of the storage unit 250 is read. And generate.
  • the area pointer table 522 associates the area number, the start address and the number of data points corresponding to this area number, and the number of times the waveform pattern stored in this area number is repeatedly output. It is table data.
  • the repeat count “0” shown in FIG. 18 indicates that there is no upper limit to the repeat count and the waveform output is repeated until there is a separate stop command. The number of times of repetition may be omitted from the area pointer table 522.
  • the logic circuit creation tool 500 has, as its function, a waveform management unit 530 for setting to output an analog signal having a predetermined waveform.
  • the waveform management unit 530 has a waveform pattern 541 indicating a plurality of predetermined waveforms, a work table 542 that associates the waveform pattern 541 with the region pointer table 522, and a region for storing the waveform pattern 541 in the storage unit 250.
  • the stored image 543 is generated.
  • the waveform pattern 541, the work table 542, and the area storage image 543 constitute the waveform information 540 regarding the waveform set and output by the user.
  • the waveform management unit 530 creates a plurality of waveform patterns 541.
  • Data strings are sequentially input to the DA conversion block 214 so that the DA conversion block 214 continuously outputs an analog signal.
  • the waveform pattern 541 corresponds to the parts forming this data string.
  • the waveform pattern 541 includes a relative address starting from zero and a digital value corresponding to the sampled value of the waveform.
  • the user may define the waveform pattern 541 by table data in which addresses and digital values are associated with each other, or may set the waveform pattern 541 by drawing a waveform using a graphic tool. Further, the waveform pattern 541 may be specified in the form of a function of time, or may be specified by adjusting a predetermined parameter. Note that P1 and P2 in FIG. 19 are identifiers of the waveform pattern 541.
  • the waveform management unit 530 associates each waveform pattern 541 and the area pointer table 522 with the work table 542.
  • the work table 542 is table data that associates the region number with the identifier of the waveform pattern 541.
  • the user sets the work table 542 by selecting the corresponding waveform pattern for each area number in the area pointer table 522.
  • the work table 542 is set, the number of data points corresponding to the area number of the area pointer table 522 is secured in the storage unit 250.
  • the waveform management unit 530 generates an area storage image 543 from the waveform pattern 541, the work table 542, and the area pointer table 522, as shown in FIG.
  • the digital values forming the waveform pattern P1 corresponding to the area number “251” are stored in order from the physical addresses “0” to “999” of the storage unit 250.
  • the digital values forming the waveform pattern P2 corresponding to the area number “252” are stored in order from the physical addresses “2000” to “3999” of the storage unit 250.
  • the waveform management unit 530 expands all the waveform patterns 541 in the storage unit 250 according to the area storage image 543 thus generated.
  • FIG. 21 illustrates the drawing contents of the logic circuit set by the user using the logic circuit creating tool 500.
  • the cam switch block 222 outputs the area number according to the pulse counting result by the counter block 221 from the terminal 222b to the terminal 224b of the waveform output block 224.
  • the waveform output block 224 functions as an output unit that switches the storage area from which the digital value is read based on the comparison by the cam switch block 222 and reads and outputs the digital value.
  • the user registers the area switching table 521 in the cam switch block 222 and the area pointer table 522 in the waveform output block 224.
  • the cam switch block 222 outputs the region number based on the comparison between the count value obtained from the counter block 221 and the condition value of the region switching table 521 to the waveform output block 224.
  • the waveform output block 224 also reads the area pointer table 522 of the internal memory 270, sequentially reads digital values from the storage area corresponding to the area number output from the cam switch block 222, and outputs the digital values to the DA conversion block 214.
  • the waveform output block 224 refers to the area in which 2000 pieces of data are stored from the address “2000”, and digitally outputs from this area. Sequential reading of values is indicated by dashed arrows.
  • the waveform output block 224 switches the storage area for reading the digital value to the area corresponding to the new area number. This switching is repeatedly executed at the output cycle set by the execution parameter of the register 224a.
  • This output cycle may be, for example, in synchronization with the internal control clock of the data control unit 210, or may be several times to several tens of times longer than this clock, but is longer than the scan time of the CPU unit 10. Set to short.
  • the DA conversion block 214 acquires the digital value continuously output from the waveform output block 224 and outputs an analog signal of a level corresponding to this digital value. That is, the DA conversion block 214 changes the level of the output analog signal according to the transition of the digital value.
  • the DA conversion block 214 functions as a DA conversion unit that converts a digital signal indicating a digital value. The granularity of the converted analog signal is determined by the output cycle of the digital value. Since the waveform output block 224 sequentially reads and outputs digital values faster than the scan time of the CPU unit 10, a smoother analog signal is output.
  • the analog signal output from the DA conversion block 214 is transmitted to the device 64 by the analog signal output interface 244.
  • the read processing is achieved by the general-purpose circuit blocks executing the processing in synchronization with the internal control clock, as shown in FIG.
  • the digital input block 211, the counter block 221, and the cam switch block 222 operate as in the first embodiment.
  • the DA conversion block 214 performs DA conversion of the digital signal formed by the digital value output from the waveform output block 224 in synchronization with the internal control clock, and outputs the analog signal to the device 64.
  • the waveform output block 224 acquires the area number (step S40). Specifically, the waveform output block 224 takes in the area number output from the cam switch block 222 and reaching the terminal 224b.
  • the waveform output block 224 determines whether or not the area number output from the cam switch block 222 has changed (step S41). Specifically, the waveform output block 224 determines whether or not the region number acquired in step S40 is different from the region number when the waveform output block 224 last read the data. When it is determined that the region number has not changed (step S41; No), the waveform output block 224 shifts the processing to step S44.
  • step S41 when it is determined that the area number has changed (step S41; Yes), the waveform output block 224 clears the relative pointer and the count parameter (step S42).
  • the number-of-times parameter is a parameter representing the number of times the waveform is repeatedly output. If the determination in step S41 is affirmative, the reading of the waveform pattern is started from a new storage area, so the relative pointer and the number-of-times parameter are set to zero.
  • the waveform output block 224 acquires from the area pointer table 522 the start address corresponding to the area number determined to have been changed in step S41 (step S43).
  • the waveform output block 224 identifies the read position of the digital value by adding the relative pointer to the start address (step S44). Specifically, the waveform output block 224 identifies the physical address for reading the digital value by adding the relative pointer to the start address of the storage area that is the current read target.
  • the waveform output block 224 reads the data from the address specified in step S44 and outputs it to the DA conversion block 214 (step S45). Specifically, the waveform output block 224 reads and outputs the digital value stored at the address obtained by adding the relative pointer to the start address.
  • the waveform output block 224 adds 1 to the number of relative pointers (step S46).
  • the waveform output block 224 determines whether the current relative pointer has reached the end of the storage area (step S47). Specifically, the waveform output block 224 refers to the area pointer table 522 and determines whether the value obtained by subtracting 1 from the number of data points in the storage area that is the current read target is equal to the relative pointer.
  • step S47; No When it is determined that the relative pointer has not reached the end (step S47; No), the waveform output block 224 ends the waveform output process. On the other hand, when it is determined that the relative pointer has reached the end (step S47; Yes), the waveform output block 224 refers to the area pointer table 522 and determines whether or not the number of repetitions is set to infinity. The determination is made (step S48). Specifically, the waveform output block 224 determines whether or not the number of repetitions associated in the area pointer table 522 with the storage area to which the address whose data has been read in step S45 belongs is “0”.
  • step S48 When it is determined that the number of repetitions is infinite (step S48; Yes), the waveform output block 224 clears the relative pointer (step S52). As a result, when the waveform output processing is executed again without changing the storage area after the digital values are sequentially read to the end of the storage area, the digital values are read again in order from the start address of this storage area. Then, the waveform pattern of the storage area is repeatedly output. Then, the waveform output process ends.
  • the waveform output block 224 determines whether the number of times parameter has reached the upper limit of the number of repetitions (step S49). Specifically, the waveform output block 224 refers to the area pointer table 522 and determines whether or not the set value of the number of times of repetition and the value of the current number of times parameter are equal.
  • the waveform output block 224 determines that the waveform output is completed (step S50) and reads the waveform pattern from this storage area. finish.
  • the waveform output block 224 may continue reading from another storage area, or may finish reading. Further, the waveform output block 224 may notify the PC 50 via the CPU unit 10 that the waveform output is completed. Then, the waveform output process ends.
  • step S49 when it is determined that the number of times parameter has not reached the upper limit (step S49; No), the waveform output block 224 adds 1 to the number of times parameter (step S51) and moves the process to step S52.
  • the above waveform output processing is repeatedly executed at the output cycle set by the execution parameter of the register 224a.
  • the data control device 20 is connected to the device 64. Further, the data control device 20 receives the communication interface 260 that receives the related information 520 including the area switching table 521 and the area pointer table 522, and the analog signal generated from the digital value read from any of the plurality of storage areas.
  • the data control unit 210 for outputting and an analog signal output interface 244 for transmitting an analog signal as an output signal to the device 64 are provided. Then, the data control unit 210 acquires the reference signal indicating the count result from the counter block 221, and reads the digital value and the cam switch block 222 that compares the value of the reference signal with the condition value of the area switching table 521. It has a waveform output block 224 that switches the storage area based on the comparison by the cam switch block 222 to read and output a digital value, and a DA conversion block 214 that converts a digital signal indicating the digital value into an analog signal.
  • the storage area from which the digital value is read can be switched according to the value of the reference signal. Therefore, the convenience of the processing regarding the analog signal output to the device 64 can be improved.
  • the data control device 20 switches the storage area at high speed in nanosecond order by hardware processing according to the value of the reference signal without being affected by the scan time of the CPU unit 10 or the program processing speed. Data can be read continuously.
  • the comparison operation block 225 or the logic operation block 226 may perform these comparisons and determinations, and the operation unit 280 may perform these comparisons and determinations. These comparisons and judgments may be performed.
  • at least one of the comparison operation block 225 and the logic operation block 226 may execute the determination in steps S41 and S47 to S49 in FIG.
  • the sixth embodiment will be described focusing on the differences from the fifth embodiment described above.
  • symbol is used and the description is abbreviate
  • the storage area is switched according to the state of the pulse signal, but an example in which the storage area is switched according to the state of the analog signal is also conceivable.
  • a mode in which the storage area is switched according to the level of the analog signal will be described.
  • FIG. 23 illustrates the drawing contents of the logic circuit created by the logic circuit creating tool 500.
  • the data control device 20 receives the analog signal output from the device 63.
  • the analog signal input interface 243 outputs the analog signal input from the device 63 to the data control unit 210.
  • the analog signal output from the device 63 is input to the AD conversion block 213, and the digital signal output from the terminal 213 b of the AD conversion block 213 is input to the terminal 222 b of the cam switch block 222.
  • the cam switch block 222 and the waveform output block 224 operate similarly to the fifth embodiment.
  • the data control device 20 has the same effect as that of the fifth embodiment even in the mode in which the storage area from which the waveform pattern is read is switched according to the analog signal from the device 63.
  • the AD conversion block 213 generates a reference signal by converting this analog signal into a digital signal as a reference signal. Then, the data control device 20 can switch the storage area at high speed according to the state of the reference signal.
  • the present embodiment can be said to be a modification of the first embodiment to the second embodiment with respect to the fifth embodiment.
  • Embodiment 7 Next, the seventh embodiment will be described focusing on the differences from the fifth embodiment described above.
  • symbol is used and the description is abbreviate
  • the storage area is switched according to the input signal input from the outside, but an example in which the reference signal for switching the storage area is generated inside the data control device 20 is also conceivable. In the following, a mode in which the data control device 20 switches the storage area at the timing generated in the inner block will be described.
  • the data control unit 210 has a clock block 229 as a general-purpose circuit block.
  • FIG. 24 illustrates the drawing contents of the logic circuit created by the logic circuit creating tool 500.
  • the counter block 221 shown in FIG. 24 the function of a ring counter that operates in a cycle desired by the user is set.
  • the counter block 221 counts the clocks of the clock block 229, and when the count value reaches the set period, counts up or counts down the ring counter and outputs the count value from the terminal 221b.
  • the output count result is input to the cam switch block 222 from the terminal 222b.
  • the cam switch block 222 and the waveform output block 224 operate similarly to the fifth embodiment.
  • the data control device 20 is separated from the input from the outside. Then, the data control device 20 can switch the storage area with high accuracy and flexibility by generating the nanosecond cycle timing desired by the user and setting the condition value of the area switching table 521 by the user. Become. It should be noted that this embodiment can be said to be a modification of the first embodiment to the third embodiment with respect to the fifth embodiment.
  • the eighth embodiment will be described focusing on the differences from the fifth embodiment described above.
  • symbol is used and the description is abbreviate
  • the storage area is switched according to the value of the reference signal, but the storage area may be directly specified by the user.
  • the data control device 20 has a shared memory 291 as shown in FIG. Further, FIG. 25 illustrates the drawing contents of the logic circuit created by the logic circuit creating tool 500. As shown in FIG. 25, when the cam switch block 222 receives the external operation switching signal from the CPU unit 10, the cam switch block 222 interrupts the capture of the count value input to the terminal 222c and collates the count value with the area switching table 521. Skip the processing that does. Then, the cam switch block 222 connects the active step number to a specific address in the shared memory 291. The CPU unit 10 stores the instruction value from the user at the address of the shared memory 291.
  • the cam switch block 222 If the value of the address in the shared memory 291 is rewritten while the external operation switching signal is input to the cam switch block 222, this value is immediately reflected in the cam switch block. Then, the cam switch block 222 outputs the step number written in the shared memory 291 and the corresponding area number in the area switching table 521.
  • the user can directly operate the active step number in the cam switch block 222 to specify the storage area at the timing desired by the user. It should be noted that the present embodiment can be said to be a modification of Embodiment 5 from Embodiment 1 to Embodiment 4.
  • the instruction value from the user is not limited to the step number, and may be the area number.
  • the waveform output block 224 may refer to the shared memory 291. In the case where the waveform output block 224 refers to, the waveform output block 224 cuts off the input from the cam switch block 222 when the external operation switching signal is input, and the area number or address stored in the shared memory 291. To get. Then, the waveform output block 224 may read out the digital value in order from the head address or the acquired address corresponding to the acquired area number and the area pointer table 522.
  • the devices 61 to 65 are described as separate devices, but a plurality of devices 60 may constitute one device.
  • the data control device 20 has the storage unit 250 built therein, but the present invention is not limited to this.
  • the storage device 2500 is connected to the data control device 20 as an external unit of the data control device 20, and the data control device 20 stores data in the storage areas 251 and 252 included in the storage device 2500. May be written or data may be read from these areas. Then, the data control device 20 may switch these areas according to the situation.
  • the storage areas 251, 252 do not have to be included in the single storage unit 250 or the storage device 2500.
  • the data control device 20 may include the storage unit 250 and be connected to the storage device 2500 to switch the storage area 251 of the storage unit 250 and the storage area 252 of the storage device 2500 according to the situation.
  • the area switching table 521 and the area pointer table 522 are stored in the internal memory 270 in the above embodiment, they may be stored in the storage unit 250.
  • the area switching table 521 and the area pointer table 522 form the related information 520, but the present invention is not limited to this.
  • the area switching table 521 and the area pointer table 522 in the first embodiment may be combined into one table as shown in FIG. 27 and registered in both the cam switch block 222 and the logger block 223.
  • the area switching table 521 and the area pointer table 522 in the fifth embodiment may be integrated into one table and registered in both the cam switch block 222 and the waveform output block 224.
  • the data type may be further associated with. The data type is used to distinguish whether each storage area is to be logged by the logger block 223 or to be read by the waveform output block 224.
  • the cam switch block 222 outputs the region number associated with the smallest value larger than the value of the reference signal among the condition values included in the region switching table 521, and the logger block 223
  • the storage area to be accessed is switched to the area associated with this area number and the area pointer table 522
  • the present invention is not limited to this.
  • the cam switch block 222 outputs the region number associated with the maximum value smaller than the value of the reference signal among the condition values included in the region switching table 521, and the logger block 223 corresponds to this region number.
  • the storage area may be switched to the area.
  • the present invention is suitable for high-speed writing of data or high-speed reading of data.
  • 1000 PLC system 100 PLC, 10 CPU unit, 11 memory, 111 parameter, 112 ladder program, 12 arithmetic unit, 13 PC interface, 14 communication interface, 20 data control device, 210 data control unit, 211 digital input block, 212 digital Output block, 213 AD conversion block, 214 DA conversion block, 221 counter block, 222 cam switch block, 223 logger block, 224 waveform output block, 225 comparison operation block, 226 logical operation block, 227 four arithmetic operation block, 228 filter block, 229 clock blocks, 211a, 212a, 213a, 214a, 221a, 222a, 223a, 224a, 225a, 226a, 227a, 228a, 229a registers, 211b, 212b, 213b, 214b, 221b, 222b, 222c, 222d, 223b, 224b.
  • circuit block switching bus 241 digital signal input interface, 242 digital signal output interface, 243 analog signal input interface, 244 analog signal output interface, 250 storage section, 251, 251a, 252, 252a storage area, 260 communication interface, 270 internal memory, 280 arithmetic unit, 290 non-volatile memory, 291 shared memory, 30 communication bus, 50 PC, 51 engineering tool, 52 communication interface, 500 logic circuit creation tool, 510 setting Information, 511 logic circuit data, 512 operation parameters, 520 related information, 521 area switching table, 522 area pointer table, 530 waveform management section, 540 waveform information, 541 waveform pattern, 542 work table, 543 area storage image, 60-65 Equipment, 61a encoder, 63a laser displacement sensor, 71 wafer, 2500 storage device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Programmable Controllers (AREA)

Abstract

データ制御装置(20)は、第1の機器(63)からアナログ信号を受信するアナログ信号入力インタフェース(243)と、記憶部(250)に含まれる複数の記憶領域(251,252)それぞれのアドレスと、この記憶領域(251,252)に関連付けられた条件値と、を示す関連情報を受信する通信インタフェース(260)と、アナログ信号から生成されるデジタル値を複数の記憶領域(251,252)のいずれかに書き込むデータ制御部(210)と、を備える。データ制御部(210)は、第2の機器(60)から入力される入力信号から生成される参照信号を取得して、参照信号の値と条件値とを比較するカムスイッチブロックと、デジタル値が書き込まれる記憶領域(251,252)を、カムスイッチブロックによる比較に基づいて切り替えて、デジタル値を書き込むロガーブロックと、を有する。

Description

データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法
 本発明は、データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法に関する。
 工場に代表される施設では、センサを利用した予防保全及び検査精度の向上のために、センサから出力されるアナログ信号のデータを高い頻度で収集したいという需要がある。そこで、アナログ信号をデジタル信号に変換して記録する技術を利用することが考えられる(例えば、特許文献1を参照)。特許文献1には、PLC(Programmable Logic Controllerプログラマブルロジックコントローラ)に装着されるA/D変換装置が、AD(Analog to Digital)変換により得たデジタル信号を時系列で内蔵のメモリに格納する技術について記載されている。この技術によれば、A/D変換装置がデジタル信号を他の装置へ送信することがないため、AD変換と同等の短い周期で高速にデータを収集することができる。
国際公開第2010/109584号
 上述のように、センサに代表される機器と装置との間で伝送される信号に関して、高速な処理が要求されている。
 特にPLCに関しては、データ収集の高速化に伴い、大量のデータを記憶することとなった。大量のデータを活用する際には、上位のサーバ側でデータが解析されることが多い一方、できるだけ現場で状況に応じたデータの仕分け或いは簡易的な解析処理を行うことが望ましい。具体的には、PLCが収集したデータを、収集対象とは異なる他の信号の値に応じて高速に仕分ける機能が市場から要求されている。しかしながら、特許文献1の技術では、収集したデータを仕分けてメモリに保存するような機能について何ら考慮されていなかった。このため、PLCが収集したデータを他の信号と照らし合わせて手動で仕分けるか、一旦保存されたデータを読み出して仕分けるプログラムを組む必要があり、煩雑な作業が生じることから、利便性を向上させる余地があった。
 本発明は、上記の事情に鑑みてなされたものであり、機器と装置との間で伝送される信号に関する処理の利便性を向上させることを目的とする。
 上記目的を達成するため、本発明のデータ制御装置は、第1機器及び第2機器に接続されるデータ制御装置であって、第1機器から機器信号を受信する第1入力インタフェースと、記憶手段に含まれる複数の記憶領域それぞれのアドレスと、該記憶領域に関連付けられた条件値と、を示す関連情報を受信する通信インタフェースと、機器信号から生成されるデジタル値を複数の記憶領域のいずれかに書き込むデータ制御手段と、を備え、データ制御手段は、第2機器から入力される入力信号から生成される参照信号を取得して、参照信号の値と条件値とを比較する比較手段と、デジタル値が書き込まれる記憶領域を、比較手段による比較に基づいて切り替えて、デジタル値を書き込むロガー手段と、を有する。
 本発明によれば、第1入力インタフェースが、第1機器から機器信号を受信する。そして、比較手段が、参照信号の値と条件値とを比較し、ロガー手段が、デジタル値が書き込まれる記憶領域を、比較手段による比較に基づいて切り替える。このため、デジタル値が書き込まれる記憶領域を、参照信号の値に応じて仕分けることができる。したがって、機器と装置との間で伝送される信号に関する処理の利便性を向上させることができる。
本発明の実施の形態1に係るPLCシステムの構成を示す図 実施の形態1に係る記憶領域を切り替えるケースを模式的に示す図 実施の形態1に係るPLCの構成を示す図 実施の形態1に係るデータ制御部の構成を示す図 実施の形態1に係るPCによって生成されるデータを示す図 実施の形態1に係るロジック回路の作図例を示す図 実施の形態1に係る領域切替テーブルを示す図 実施の形態1に係る領域ポインタテーブルを示す図 実施の形態1に係るカムスイッチ処理を示すフローチャート 実施の形態1に係る参照信号及び領域番号の推移を示す図 実施の形態1に係るロガー処理を示すフローチャート 実施の形態2に係るロジック回路の作図例を示す図 実施の形態3に係るデータ制御部の構成を示す図 実施の形態3に係るロジック回路の作図例を示す図 実施の形態4に係るPLCの構成を示す図 実施の形態4に係るロジック回路の作図例を示す図 実施の形態5に係るPCによって生成されるデータを示す図 実施の形態5に係る領域ポインタテーブルを示す図 実施の形態5に係る波形管理部の機能を模式的に示す第1の図 実施の形態5に係る波形管理部の機能を模式的に示す第2の図 実施の形態5に係るロジック回路の作図例を示す図 実施の形態5に係る波形出力処理を示すフローチャート 実施の形態6に係るロジック回路の作図例を示す図 実施の形態7に係るロジック回路の作図例を示す図 実施の形態8に係るロジック回路の作図例を示す図 変形例に係るデータ制御装置の構成を示す図 変形例に係る関連情報を示す第1の図 変形例に係る関連情報を示す第2の図
 以下、本発明の実施の形態に係るPLCシステム1000について、図面を参照しつつ詳細に説明する。
 実施の形態1.
 <PLCシステム1000の概要>
 本実施の形態に係るPLCシステム1000は、工場に設置されるFAシステムの一部に相当する制御システムである。PLCシステム1000は、FAシステムを構成する機器同士を、通信路を介して接続することで形成される。PLCシステム1000は、図1に示されるように、生産ラインに設置された機器61,62,63,64を制御するPLC100と、PLC100の動作を設定するためのパーソナルコンピュータ50と、を有する。以下では、パーソナルコンピュータ50をPC50と表記する。
 PLC100には、機器61~64が接続される。機器61は、エンコーダに代表される外部機器であって、デジタル信号を出力する。この機器61から出力されたデジタル信号は、PLC100に入力される。機器62は、電磁弁に代表される外部機器であって、機器62には、PLC100から出力されたデジタル信号が入力される。機器63は、レーザー変位センサに代表される外部機器であって、アナログ信号を出力する。この機器63から出力されたアナログ信号は、PLC100に入力される。機器64は、調節弁に代表される外部機器であって、機器64には、PLC100から出力されたアナログ信号が入力される。以下では、機器61~64を総称して機器60と表記する。
 なお、機器60は、上記のエンコーダ、電磁弁、レーザー変位センサ及び調節弁に限定されず、アナログ信号の出力、アナログ信号の入力、デジタル信号の出力、及びデジタル信号の入力、のうち少なくとも1つの機能を有する機器であればよい。例えば、機器61,63は、流量、圧力及び温度に代表される量を観測して電流値又は電圧値を出力するセンサであってもよい。
 PLC100は、PC50からユーザによって設定されたプログラムを実行して機器60を制御することにより生産ラインを稼働させる制御装置である。PLC100は、演算処理を実行してデータ制御装置20に指示を送るCPUユニット10と、CPUユニット10からの指示に従って動作するデータ制御装置20と、を有する。
 データ制御装置20は、機器60からデータ制御装置20に入力される信号、及びデータ制御装置20自体から機器60へ出力される信号を制御するデータ制御部210と、データを記憶する記憶部250と、を有する。機器60から入力される信号のデータ制御部210による制御には、当該信号に関するデータを記憶部250にロギングすることが含まれる。詳細には、データ制御部210は、機器60から継続して入力されるアナログ信号にAD変換を施すことによりデジタル信号を得て、このデジタル信号に含まれるデジタル値を記憶部250に順次書き込む。そして、データ制御部210は、デジタル値の書き込み先を、記憶部250に含まれる複数の記憶領域251,252のうちのいずれか一の領域から、状況に応じて他の領域に高速に切り替える。
 例えば、図2に示されるように、ウェハ71を回転させながら、機器61の一例であるエンコーダ61aがウェハ71の角度を計測し、機器63の一例であるレーザ変位センサ63aがウェハ71の厚みを計測するケースを想定する。このケースにおいて、エンコーダ61aからは角度に対応するパルス信号が出力され、レーザ変位センサ63aからは厚みを示すアナログ信号が出力される。
 そして、アナログ信号にAD変換を施して得るデジタル信号は、記憶領域251の一例である記憶領域251aに記録される。また、パルス信号のパルスをカウントした結果が閾値Th1を超えたときには、記録が中断することなく、記憶領域252の一例である記憶領域252aに記録先が変更されてデジタル信号の記録が継続される。図2に示されるケースにおいては、パルスのカウント結果を示す参照信号と閾値との比較に基づいて記録先が切り替わることとなる。
 <PLC100の構成>
 PLC100は、PC50からの設定に従って、図2に示されるようなロギング処理に限定されない種々の制御処理を実現する。以下では、種々の制御処理を実現するためのPLC100の構成について、図3を参照して説明する。図3に示されるように、PLC100のCPUユニット10及びデータ制御装置20は、通信バス30を介して接続されて互いに通信する。
 CPUユニット10は、PLC100を構成する演算処理ユニットに相当し、ラダープログラム112を実行する。ラダープログラム112は、PLC100が備える各装置を動作させて産業用機器を制御するためのプログラムである。ラダープログラム112の実行による制御には、データ制御装置20の制御の他に、不図示の装置の制御が含まれ得る。CPUユニット10は、ラダープログラム112の実行と、ラダープログラム112の実行結果の出力と、ラダープログラム112によって使用される値の取得と、を予め定められた周期で繰り返し実行する。この周期は、制御周期、或いはスキャンタイムと呼ばれ、ミリ秒オーダの時間である。換言すると、この周期の長さは通常、1ミリ秒以上である。
 CPUユニット10は、図3に示されるように、予め設定されたパラメータ111及びラダープログラム112を記憶するメモリ11と、メモリ11に格納されているパラメータ111に従ってラダープログラム112を実行する演算部12と、PC50と通信するためのPCインタフェース13と、通信バス30を介してデータ制御装置20と通信するための通信インタフェース14と、を有する。
 メモリ11は、不揮発性のメモリであって、例えば半導体フラッシュメモリ又は磁気ディスクに相当する。演算部12は、CPUと、当該CPUの作業領域となるRAMと、を有する。PCインタフェース13は、例えばUSB(Universal Serial Bus)インタフェース回路を含む。通信インタフェース14は、データ制御装置20と通信するための通信インタフェース回路を有する。
 データ制御装置20は、CPUユニット10に装着されて利用される、PLC100の入出力制御ユニット或いはI/O(Input/Output)ユニットに相当する。データ制御装置20は、データ制御装置20と機器60との間で入出力されるデジタル信号に含まれるデータ及びアナログ信号に関するデータを制御する。なお、データ制御装置20は、データ制御装置20から出力される信号のデータを制御することで、機器60を制御してもよい。データ制御装置20は、上述のデータ制御部210及び記憶部250の他に、デジタル信号を受信するデジタル信号入力インタフェース241と、デジタル信号を送信するデジタル信号出力インタフェース242と、アナログ信号を受信するアナログ信号入力インタフェース243と、アナログ信号を送信するアナログ信号出力インタフェース244と、通信バス30を介して通信するための通信インタフェース260と、データ制御部210の動作を規定する動作パラメータを記憶する内部メモリ270と、動作パラメータに従ってデータ制御部210を動作させる演算部280と、電源切断時に備えてデータを記憶する不揮発性メモリ290と、を有する。
 デジタル信号入力インタフェース241は、機器61から入力されたデジタル信号をデータ制御部210に出力する。デジタル信号出力インタフェース242は、データ制御部210から入力されたデジタル信号を機器62に出力する。アナログ信号入力インタフェース243は、機器63から入力されたアナログ信号をデータ制御部210に出力する。アナログ信号入力インタフェース243は、第1機器としてデータ制御装置20に接続される機器63から、機器信号を受信する第1入力インタフェースの一例である。ここで、機器信号は、記録対象である値を出力する機器60からの信号を意味する。アナログ信号出力インタフェース244は、データ制御部210から入力されたアナログ信号を機器64に出力する。
 ここで、データ制御部210の構成について図4を参照して説明する。データ制御部210は、ハードウェアによる再構成集積回路であって、いわゆるPLD(Programmable Logic Device)に相当する。データ制御部210は、並列処理によりナノ秒オーダで高速に動作する。データ制御部210は、データ制御装置20の構成要素のうち、アナログ信号から生成されるデジタル値を複数の記憶領域251~252のいずれかに書き込むデータ制御手段として機能する。データ制御部210は、複数の汎用回路ブロックと、汎用回路ブロックの組合せ及び使用順序の少なくとも一方を変更可能な通信路である回路ブロック切替バス230と、を有する。
 詳細には、データ制御部210は、汎用回路ブロックとして、デジタル信号入力インタフェース241からデジタル信号が入力されるデジタル入力ブロック211と、デジタル信号出力インタフェース242へデジタル信号を出力するデジタル出力ブロック212と、アナログ信号入力インタフェース243によって受信されたアナログ信号をデジタル信号に変換するAD変換ブロック213と、アナログ信号出力インタフェース244に与えるアナログ信号を生成するDA変換ブロック214と、数値を計数するカウンタブロック221と、入力値に応じて出力値を切り替えて出力するカムスイッチブロック222と、入力された値をロギングするロガーブロック223と、アナログ形式の波形を出力するための波形出力ブロック224と、データの比較処理を行う比較演算ブロック225と、論理演算を行う論理演算ブロック226と、四則演算を行う四則演算ブロック227と、信号にフィルタリングを施すフィルタブロック228と、を有する。
 汎用回路ブロックはそれぞれ、実行する処理に利用される実行パラメータを記憶するレジスタと、データを入出力するためのデータ入出力端子と、を有する。詳細には、デジタル入力ブロック211は、レジスタ211aと端子211bとを有する。デジタル出力ブロック212は、レジスタ212aと端子212bとを有する。AD変換ブロック213は、レジスタ213aと端子213bとを有する。DA変換ブロック214は、レジスタ214aと端子214bとを有する。カウンタブロック221は、レジスタ221aと端子221bとを有する。カムスイッチブロック222は、レジスタ222aと端子222bとを有する。ロガーブロック223は、レジスタ223aと端子223bとを有する。波形出力ブロック224は、レジスタ224aと端子224bとを有する。比較演算ブロック225は、レジスタ225aと端子225bとを有する。論理演算ブロック226は、レジスタ226aと端子226bとを有する。四則演算ブロック227は、レジスタ227aと端子227bとを有する。フィルタブロック228は、レジスタ228aと端子228bとを有する。
 デジタル入力ブロック211は、レジスタ211aに登録された実行パラメータに従って、デジタル信号入力インタフェース241からデジタル信号の入力を受けて、当該デジタル信号を端子211bから汎用回路ブロック又はデータ制御部210の外部に出力する。また、デジタル出力ブロック212は、レジスタ212aに登録された実行パラメータに従って、汎用回路ブロック又はデータ制御部210の外部から端子212bを介してデジタル信号を受けて、当該デジタル信号をデジタル信号出力インタフェース242に出力する。
 AD変換ブロック213は、いわゆるAD変換回路に相当し、アナログ信号を、デジタル値を示すデジタル信号に変換するAD変換手段の一例である。AD変換ブロック213は、レジスタ213aに登録された実行パラメータに従って、アナログ信号入力インタフェース243から供給されたアナログ信号を予め定められたサンプリング周期及び分解能で離散化及び量子化することにより変換して得たデジタル信号を汎用回路ブロック又はデータ制御部210の外部に出力する。例えば、AD変換ブロック213が、-10V~+10Vの範囲のアナログ信号のレベルに対応する16bitのデジタル値を継続的に出力することで、このデジタル値の系列であるデジタル信号を出力することが、実行パラメータにより規定される。
 DA変換ブロック214は、いわゆるDA変換回路に相当する。DA変換ブロックは、レジスタ214aに登録された実行パラメータに従って、汎用回路ブロック又はデータ制御部210の外部から端子214bを介して供給されたデジタル信号を変換して得たアナログ信号をアナログ信号出力インタフェース244へ出力する。例えば、DA変換ブロック214が、順次入力される16bitのデジタル値に対応して、アナログ信号のレベルを-10V~+10Vの範囲内で変化させて出力することが、実行パラメータにより規定される。
 カウンタブロック221は、レジスタ221aに登録された実行パラメータに従って、端子211bから入力された信号をカウントして得た結果を端子211bから出力する。カムスイッチブロック222は、レジスタ222aに登録された実行パラメータに従って、端子222bに入力された入力値に応じた出力値を端子222bから出力する。ロガーブロック223は、レジスタ223aに登録された実行パラメータに従って、端子223bから入力された値を、記憶部250へ端子223bを介して出力して、データをロギングする。波形出力ブロック224は、レジスタ224aに登録された実行パラメータに従って、記憶部250から読み出したデジタル値を端子224bから順次出力する。このデジタル値により形成されるデジタル信号は、AD変換されてデータ制御装置20の外部に出力される。
 比較演算ブロック225は、レジスタ225aに登録された実行パラメータに従って、端子225bから入力されるデータの値を比較して、比較結果を端子225bから出力する。論理演算ブロック226は、レジスタ226aに登録された実行パラメータに従って、端子226bから入力された値に対して基本的な論理演算を実行し、実行結果を端子226bから出力する。この論理演算は、例えば、端子226bから入力されたbitデータの論理否定、論理積、論理和、排他的論理和、否定論理和、及び否定論理積を含む。四則演算ブロック227は、レジスタ227aに登録された実行パラメータに従って、端子227bから入力された値の四則演算を実行して、実行結果を端子227bから出力する。この四則演算は、例えば、16bitのwordデータの加算、減算、乗算、除算を含む。フィルタブロック228は、レジスタ228aに登録された実行パラメータに従って、フィルタリング処理を実行する。例えば、フィルタブロック228が、端子228bに連続して入力された値の平均値を、移動平均として端子228bから出力することが、実行パラメータにより規定される。フィルタブロック228は、例えば、入力信号のノイズを除去するために用いられる。
 図3に戻り、記憶部250は、揮発性の半導体フラッシュメモリを含む。記憶部250は、後述のように高速な読み書きを実現可能なストレージであることが好ましい。記憶部250は、データ制御部210から出力されるデータを記憶するための記憶領域251~252を有する記憶手段として機能する。図3には、記憶部250が有する2つの記憶領域251,252が代表的に示されているが、領域の数は2つに限られず、2つより多くてもよい。記憶部250のデータ容量は、例えば10MByte、1GByte、又は1TByteである。記憶領域251~252の容量は、例えば1MByteであるが、任意に変更してもよい。
 通信インタフェース260は、通信バス30を介して通信するためのインタフェース回路を含む。
 内部メモリ270は、揮発性の半導体フラッシュメモリを含む。内部メモリ270は、データ制御部210の高速な内部処理に合わせて、ある程度高速に応答するストレージであることが好ましい。内部メモリ270は、動作パラメータを記憶する。この動作パラメータは、汎用回路ブロックを組み合わせて動作させるための順序を規定する情報である。また、内部メモリ270は、後述するように、動作パラメータの他に、動作パラメータと合わせてデータ制御部210の動作を規定するための情報を記憶してもよい。これらの情報は、PC50からCPUユニット10を介して内部メモリ270に書き込まれる。
 演算部280は、内部メモリ270が記憶する動作パラメータに基づいて、データ制御部210が有する複数の汎用回路ブロックの再構成を実行する。詳細には、演算部280は、内部メモリ270に格納された動作パラメータを解析して、汎用回路ブロックの組合せ、使用順序、及び動作内容のうち少なくとも1つを決定する。そして、演算部280は、汎用回路ブロックのレジスタ211a,212a,213a,214a,221a,222a,223a,224a,225a,226a,227a,228aに実行パラメータを書き込むことにより、決定した動作をデータ制御部210に実現させる。また、演算部280は、データ制御部210が取得したデータの自動判定を行う。
 不揮発性メモリ290は、磁気メモリ又は半導体フラッシュメモリを含む。不揮発性メモリ290は、データ制御装置20の電源切断に備えて、記憶部250及び内部メモリ270と同等のデータを記憶する。データ制御装置20の電源が切断されてから再度投入される際には、不揮発性メモリ290に格納されているデータが記憶部250及び内部メモリ270に展開されることで、電源の切断前後における記憶部250及び内部メモリ270のデータの一貫性が保たれる。
 <PC50からの設定>
 続いて、動作パラメータを設定してデータ制御部210による具体的な制御内容を規定するための構成について説明する。図5に示されるように、PC50は、ラダープログラム112の作成、種々の設定、及びPLC100の状態のモニタリングをするためのエンジニアリングツール51と、CPUユニット10と通信するための通信インタフェース52と、を有する。
 エンジニアリングツール51は、ユーザがPLC100に関する設定をするためのツールとして、PC50がソフトウェアを実行することで実現される機能である。エンジニアリングツール51は、データ制御装置20の動作を設定するためのロジック回路作成ツール500を有する。
 ロジック回路作成ツール500は、データ制御装置20の動作を規定するハードウェアロジック回路の作図内容及び設定を示すロジック回路データ511と、記憶部250の記憶領域を切り替えるための領域切替テーブル521及び領域ポインタテーブル522と、を生成する。
 ロジック回路データ511は、ロジック回路作成ツール500によって動作パラメータ512に変換される。そして、ロジック回路作成ツール500は、動作パラメータ512、領域切替テーブル521及び領域ポインタテーブル522を、CPUユニット10から通信バス30を経由して、データ制御装置20の内部メモリ270に格納する。
 ロジック回路データ511及び動作パラメータ512はそれぞれ、データ制御部210の動作内容の設定を示す設定情報510を構成する。なお、図5では、設定情報510がロジック回路データ511及び動作パラメータ512のそれぞれに等しい例が示されているが、これには限定されない。例えば、ロジック回路作成ツール500により生成されたロジック回路データ511を他のデータと合わせて設定情報510としてもよい。また、領域切替テーブル521及び領域ポインタテーブル522は、記憶領域を切り替える基準となる参照信号の値と記憶領域のアドレスとを関連付ける関連情報520を構成する。関連情報520は、記憶部250に含まれる記憶領域251~252それぞれのアドレスと、この記憶領域251~252に関連付けられた後述の条件値とを示す情報である。データ制御装置20の通信インタフェース260は、設定情報510及び関連情報520を受信して、演算部280は、これらの情報を内部メモリ270に格納する。
 図6には、ロジック回路作成ツール500を利用してユーザにより設定されたロジック回路の作図内容が例示されている。図6の例では、機器63から出力されるアナログ信号がAD変換ブロック213に入力され、AD変換ブロック213の端子213bから出力される信号がロガーブロック223の端子223bに入力される。AD変換ブロック213は、データ制御部210の内部制御クロックに同期して、ナノ秒オーダの周期でデジタル値をロガーブロック223に順次出力し続ける。
 また、機器61から出力されるパルス信号がデジタル入力ブロック211に入力され、デジタル入力ブロック211の端子211bから出力される信号がカウンタブロック221の端子221bに入力されることで、カウンタブロック221は、パルスの立ち上がり回数を計数してパルスのカウント結果を示す信号を出力するカウンタ手段として機能する。カウンタブロック221による計数及びカウント結果の出力は、データ制御部210の内部制御クロックに同期して、ナノ秒オーダの周期で実行される。そして、カウンタブロック221によるカウント結果は、カウンタブロック221の端子221bからカムスイッチブロック222の端子222bに入力され、カムスイッチブロック222は、カウント結果に応じた値を端子222bからロガーブロック223の端子223bに出力する。
 例えば、ユーザが、図6中のロジック回路作成ツール500と同等の画面を視認しながら、各汎用回路ブロックに対応するオブジェクトを配置して、信号線を示す線でオブジェクト同士を接続することにより、ロジック回路を作図する。図6に示されるようにロジック回路が設定された場合には、AD変換ブロック213、ロガーブロック223、デジタル入力ブロック211及びカウンタブロック221の組合せと、これらブロックによる処理の順序に対応する信号の経路と、を示すロジック回路データ511が生成される。そして、ロジック回路作成ツール500は、ロジック回路データ511を動作パラメータ512に変換して、CPUユニット10から通信バス30を経由してデータ制御装置20へ送信する。データ制御装置20によって受信された動作パラメータ512は、図5に示されるように内部メモリ270に格納される。
 また、図6に示される例において、ユーザは、領域切替テーブル521をカムスイッチブロック222に登録し、領域ポインタテーブル522をロガーブロック223に登録する。
 領域切替テーブル521は、図7に例示されるように、入力値と比較される条件値と、記憶領域を識別するための領域番号と、条件値及び領域番号を関連付けるインデックスの役割を果たすステップ番号と、を含む。例えば、ステップ番号「1」は、条件値「2000」と領域番号「252」とを対応付けるインデックスである。なお、図7において、記憶領域251,252に対応する領域番号を、記憶領域251,252の符号に等しいものとしている。
 この領域切替テーブル521が図6に示されるようにカムスイッチブロック222に登録されると、カムスイッチブロック222は、参照信号を取得して、前記参照信号の値と前記条件値とを比較する比較手段として機能する。詳細には、カムスイッチブロック222は、内部メモリ270の領域切替テーブル521を読み出して、カウンタブロック221から出力される値と条件値とを比較する。そして、カムスイッチブロック222は、この比較に基づいて領域番号を示す信号を出力する。詳細には、カムスイッチブロック222は、複数の条件値のうち、カウンタブロック221からの入力値より大きい最小の値に関連付けられた領域番号を出力する。例えば、入力値がゼロから999までの範囲内にあれば、条件値「1000」に関連付けられた領域番号「251」が出力され、入力値が1000から1999までの範囲内にあれば、条件値「2000」に関連付けられた領域番号「252」が出力される。図6においては、現在のステップ番号である「1」に対応する領域番号「252」が出力されることが破線で示されている。
 領域ポインタテーブル522は、図8に例示されるように、領域切替テーブル521と共通する領域番号と、記憶領域それぞれの物理アドレスである先頭アドレスと、記憶領域に格納可能なデータ点数と、を関連付けるテーブルデータである。この領域ポインタテーブル522が図6に示されるようにロガーブロック223に登録されると、ロガーブロック223は、デジタル値が書き込まれる記憶領域を、カムスイッチブロック222による比較に基づいて切り替えてデジタル値を書き込むロガー手段として機能する。詳細には、ロガーブロック223は、内部メモリ270の領域ポインタテーブル522を読み出して、AD変換ブロック213から出力されたデジタル値を、カムスイッチブロック222から出力された領域番号に対応する記憶領域に順次格納する。例えば、カムスイッチブロック222から領域番号「252」が出力されている状態において、ロガーブロック223は、アドレス「30000」から10000個のデータを格納可能な領域にデジタル値を順次蓄積する。
 そして、ロガーブロック223は、カムスイッチブロック222から出力される領域番号が切り替わると、デジタル値を格納する記憶領域を、新たな領域番号に対応する領域に切り替える。この切り替えは、レジスタ223aの実行パラメータにより設定されたロギング周期で繰り返し実行され得る。このロギング周期は、例えば、データ制御部210の内部制御クロック自体に同期してもよいし、このクロックの数倍から数十倍の長さであってもよいが、CPUユニット10のスキャンタイムより大幅に短く設定される。すなわち、AD変換ブロック213によるAD変換が実行される周期に近い周期で領域が切り替わるため、AD変換により得たデジタル値を取りこぼすことなく、高速に記憶領域を切り替えてデジタル値のロギングを継続することができる。
 <データ制御装置20によるロギング処理>
 続いて、図6に示される動作が設定されたデータ制御装置20による書き込み処理について説明する。書き込み処理は、図6に示されるように、汎用回路ブロックがそれぞれ、内部制御クロックに同期して処理を実行することにより達成される。例えば、AD変換ブロック213は、内部制御クロックに同期して、機器63から入力されるアナログ信号のAD変換及びデジタル値の出力を実行する。また、デジタル入力ブロック211は、内部制御クロックに同期して、機器61から入力されるパルス信号をカウンタブロック221に出力する。カウンタブロック221は、内部制御クロックに同期して、パルス信号に含まれるパルスの立ち上がりを計数した結果をカムスイッチブロックに出力する。
 続いて、カムスイッチブロック222によるカムスイッチ処理と、ロガーブロック223によるロガー処理について、図9~11を参照して説明する。
 図9に示されるカムスイッチ処理において、カムスイッチブロック222は、参照信号を取得する(ステップS10)。参照信号は、記憶領域の切り替えのために参照される信号であって、図6に示される例においては、カウンタブロック221から出力されるカウント結果を示す信号が参照信号に相当する。
 次に、カムスイッチブロック222は、参照信号の値と条件値とを比較する(ステップS11)。具体的には、カムスイッチブロック222は、参照信号の値と、領域切替テーブル521に含まれる複数の条件値それぞれと、を比較する。ただし、カムスイッチブロック222は、複数の条件値それぞれと比較することなく、いずれか1つの条件値との比較を実行してもよい。例えば、図7に示される例においては、参照信号の値がゼロから999までの範囲内にあるときには条件値「1000」と比較し、参照信号の値が1000になったときに比較される条件値を「2000」に変更すればよい。
 図9に戻り、ステップS11に続いて、カムスイッチブロック222は、比較に基づいて領域番号を出力する(ステップS12)。具体的には、カムスイッチブロック222は、参照信号の値より大きい条件値のうち最小の値に対応する領域番号を、ロガーブロック223に出力する。その後、カムスイッチ処理が終了する。以上のカムスイッチ処理が、内部制御クロックに同期して繰り返し実行される。
 図10には、パルス信号の波形と、カウンタブロック221の出力信号と、この出力信号に応じてカムスイッチブロック222が参照する領域切替テーブル521のステップ番号と、カムスイッチブロック222から出力される領域番号と、の推移が示されている。図10に示されるように、カウンタブロック221は、パルス信号の立ち上がりをカウントしてカウント値をインクリメントし続ける。カムスイッチブロック222は、カウント値を領域切替テーブル521の条件値と比較し、カウンタ値が条件値以上となったときに、ステップ番号を1つ大きい番号に切り替える。例えば、カウント値が2999のときにカムスイッチブロックはステップ番号「1」を選択し、領域番号「252」を出力する。ここで、次のカウンタ値「3000」がカウンタブロック221から送られると、このカウンタ値が条件値と比較された結果、ステップ番号は「2」に移行するとともに、領域番号は「253」に切り替わる。
 図11には、ロガーブロック223によるロガー処理が示されている。
 ロガー処理において、ロガーブロック223は、領域番号と書き込み対象のデータを取得する(ステップS20)。具体的には、ロガーブロック223は、カムスイッチブロック222から出力されて端子223bに到達している領域番号と、AD変換ブロック213から出力されて端子223bに到達している書き込み対象のデータであるデジタル値と、を同時に取り込む。
 次に、ロガーブロック223は、カムスイッチブロック222から出力される領域番号に変化があるか否かを判定する(ステップS21)。具体的には、ロガーブロック223は、ステップS20で取得した領域番号が、前回ロガーブロック223がデータを書き込んだときの領域番号と異なるか否かを判定する。領域番号に変化がないと判定した場合(ステップS21;No)、ロガーブロック223は、ステップS24に処理を移行する。
 一方、領域番号に変化があると判定した場合(ステップS21;Yes)、ロガーブロック223は、相対ポインタとロギングデータ数とをクリアする(ステップS22)。相対ポインタは、1つの記憶領域においてデジタル値を格納する相対的な位置を示すポインタであり、先頭アドレスからのオフセットを示す。ロギングデータ数は、1つの記憶領域に連続して書き込んだデジタル値の数を示す。ステップS21の判定が肯定された場合には、デジタル値が書き込まれる記憶領域が変更されるため、ロガーブロック223は、相対ポインタ及びロギングデータ数とをゼロに設定する。
 次に、ロガーブロック223は、ステップS21にて変更されたと判定された領域番号に対応する先頭アドレスを領域ポインタテーブル522から取得する(ステップS23)。
 次に、ロガーブロック223は、先頭アドレスに相対ポインタを加算することにより、デジタル値の書込位置を特定する(ステップS24)。具体的には、ロガーブロック223は、現在の書き込み対象である記憶領域の先頭アドレスに相対ポインタを加算することで、書き込み先の物理アドレスを特定する。
 次に、ロガーブロック223は、ステップS24にて特定された位置にデータを書き込む(ステップS25)。具体的には、ロガーブロック223は、ステップS24にて特定したアドレスに、AD変換ブロック213から取得したデジタル値を格納する。
 次に、ロガーブロック223は、ロギングデータ数に1を加算し(ステップS26)、相対ポインタ数に1を加算する(ステップS27)。次に、ロガーブロック223は、現在の相対ポインタが記憶領域の最後尾に到達しているかを判定する(ステップS28)。具体的には、ロガーブロック223は、領域ポインタテーブル522を参照して、現在の書き込み対象である記憶領域のデータ点数から1を減じた値と相対ポインタとが等しいか否かを判定する。例えば、図8に示される例において、記憶領域252にデジタル値が順次格納されたときに、ロガーブロック223は、相対ポインタが「9999」となっているか否かを判定する。
 相対ポインタが最後尾に到達していないと判定した場合(ステップS28;No)、ロガーブロック223は、ロガー処理を終了する。一方、相対ポインタが最後尾に到達していると判定した場合(ステップS28;Yes)、ロガーブロック223は、リングバッファが有効か否かを判定する(ステップS29)。具体的には、ロガーブロック223は、レジスタ223aを参照して、記憶領域をリングバッファとして扱うか否かを示すフラグがON状態であるかOFF状態であるかを判定する。なお、リングバッファの設定は、レジスタ223aに代えてロジック回路データ511により設定されてもよいし、領域切替テーブル521又は領域ポインタテーブル522において記憶領域毎に設定されてもよい。
 リングバッファが有効であると判定した場合(ステップS29;Yes)、ロガーブロック223は、相対ポインタをクリアして、その値をゼロに設定する(ステップS30)。これにより、記憶領域の最後尾までデジタル値が書き込まれた後に記憶領域が変更されることなくロガー処理が再度実行されたときに、この記憶領域の先頭アドレスから順にデジタル値が再度書き込まれ、データの格納が繰り返されることになる。その後、ロガー処理が終了する。
 一方、リングバッファが有効でないと判定した場合(ステップS29;No)、ロガーブロック223は、ロギングが完了したと判断して(ステップS31)、この記憶領域への書き込みを終了する。なお、ロガーブロック223は、他の記憶領域への書き込みを継続してもよいし、終了してもよい。また、ロガーブロック223は、ロギングが完了した旨をCPUユニット10を介してPC50に通知してもよい。その後、ロガー処理が終了する。
 ロギングされたデータは、ラダープログラム112によって利用される。例えば、ロギングされたデータは、ユーザに対して表示されてもよいし、他の処理において参照されてもよいし、PC50へ転送されてもよい。
 以上のロガー処理が、レジスタ223aの実行パラメータにより設定されたロギング周期で繰り返し実行される。
 <実施の形態1に係るデータ制御装置20の効果>
 以上、説明したように、アナログ信号入力インタフェース243が、第1機器としての機器63から機器信号であるアナログ信号を受信し、AD変換ブロック213が、アナログ信号を、デジタル値を示すデジタル信号に変換する。そして、第2機器としての機器61からは、データ制御装置20への入力信号としてパルス信号が出力される。カムスイッチブロック222は、このパルス信号から生成された参照信号を取得し、この参照信号としてのカウント値と領域切替テーブル521の条件値とを比較し、ロガーブロック223が、デジタル値が書き込まれる記憶領域を、カムスイッチブロック222による比較に基づいて切り替える。このため、デジタル値が書き込まれる記憶領域を、参照信号の値に応じて仕分けることができる。したがって、機器63から出力されるアナログ信号に関する処理の利便性を向上させることができる。
 具体的には、データ制御装置20は、CPUユニット10のスキャンタイム或いはプログラム処理速度に影響されることなく、この入力信号から生成された参照信号の値に応じて、ハードウェア処理により、ナノ秒オーダで記憶領域を高速に切り替えてロギングを継続することができる。
 より詳細には、データ制御装置20は、機器61から入力信号を受信する第2入力インタフェースとしてデジタル信号入力インタフェース241を備える。この入力信号は、パルス信号である。また、データ制御部210は、このパルス信号に含まれるパルスの数をカウントして、カウント結果を示す参照信号を出力するカウンタブロック221を有する。これにより、データ制御装置20は、パルス信号の状態に応じて、記憶領域を切り替えることができる。
 また、ロガーブロック223は、デジタル値が書き込まれる記憶領域を、条件値のうち参照信号の値より大きい最小の値に関連付けられたアドレスの記憶領域に切り替えた。このため、カムスイッチブロック222は、参照信号の値を条件値すべてと比較する必要がなく、処理負荷を軽減することができる。
 なお、レジスタ223aの実行パラメータによりロガーブロック223が記憶領域をリングバッファとして扱うか否かが設定される例を説明したが、これには限定されない。ロガーブロック223は、実行パラメータに関わらず、記憶領域をリングバッファとして扱ってもよいし、リングバッファでないものとして扱ってもよい。ロジック回路作成ツール500による設定項目からリングバッファの設定を省略してもよい。
 また、カムスイッチブロック222及びロガーブロック223が比較及び判定をするものとして説明したが、比較演算ブロック225又は論理演算ブロック226がこれらの比較及び判定を実行してもよいし、演算部280がこれらの比較及び判定を実行してもよい。例えば、比較演算ブロック225が、カウンタブロック221から出力される値の大きさと、カムスイッチブロック222から出力される値の大きさとを比較して、後者が大きいか否かを示すデータをカムスイッチブロック222に出力することが、実行パラメータにより規定されてもよい。
 実施の形態2.
 続いて、実施の形態2について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。上記実施の形態1では、パルス信号の状態に応じて記憶領域が切り替わったが、ロギング対象とは異なるアナログ信号の状態に応じて記憶領域を切り替える例も考えられる。以下では、アナログ信号のレベルに応じて記憶領域を切り替える形態について説明する。
 図12には、ロジック回路作成ツール500を利用してユーザにより設定されたロジック回路の作図内容が例示されている。データ制御装置20は、機器65から出力されるアナログ信号を受信する。詳細には、データ制御装置20が、機器63,65に接続され、アナログ信号入力インタフェース243が、機器63及び機器65それぞれから入力されたアナログ信号をデータ制御部210に出力する。そして、図12に示されるように、機器65から出力されるアナログ信号がAD変換ブロック213に入力され、AD変換ブロック213の端子213bから出力されるデジタル信号がカムスイッチブロック222の端子222bに入力される。カムスイッチブロック222及びロガーブロック223は、実施の形態1と同様に動作する。
 以上、説明したように、機器65からのアナログ信号に応じて、機器63からのアナログ信号に関するデータを書き込む領域を切り替える形態においても、データ制御装置20は、実施の形態1と同様の効果を奏する。具体的には、データ制御装置20は、機器65からの入力信号としてアナログ信号を受信するアナログ信号入力インタフェース243を備える。また、AD変換ブロック213が、このアナログ信号を参照信号としてのデジタル信号に変換することで、参照信号を生成する。詳細には、AD変換ブロック213が、機器信号である機器63からのアナログ信号のレベルをデジタル値に変換するとともに、入力信号である機器65からのアナログ信号を、参照信号としてのデジタル信号に変換する。そして、データ制御装置20は、機器65からのアナログ信号の状態に応じて、記憶領域を切り替えることができる。
 実施の形態3.
 続いて、実施の形態3について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。上記実施の形態1,2では、外部から入力された入力信号に応じて記憶領域が切り替わったが、データ制御装置20の内部で、記憶領域を切り替えるための参照信号を生成する例も考えられる。以下では、データ制御装置20が内部クロックで生成したタイミングで記憶領域を切り替える形態について説明する。
 図13には、本実施の形態に係るデータ制御部210の構成として、図4のフィルタブロック228に代えてクロックブロック229を含む例が示されている。クロックブロック229は、クロック信号を生成して汎用回路ブロックに供給し、データ制御部210の内部制御クロックとして機能する。クロック信号の周期は、ナノ秒オーダであって、具体的には、1~10ナノ秒である。なお、クロックブロック229は、図4では省略されていたが、実施の形態1,2に係るデータ制御部210を構成してもよい。
 クロックブロック229は、レジスタ229aと端子229bとを有する。クロックブロック229は、レジスタ229aに登録された実行パラメータに従って、クロック信号を端子229bから出力する。
 図14には、ロジック回路作成ツール500を利用してユーザにより設定されたロジック回路の作図内容が例示されている。図14に示されるカウンタブロック221には、ユーザが希望する周期で動作するリングカウンタの機能が設定される。カウンタブロック221は、クロックブロック229のクロックをカウントする。カウント結果が予めロジック回路作成ツール500によって設定された周期に到達した場合には、カウンタブロック221は、リングカウンタのカウントアップ又はカウントダウンを実行して、カウント値を端子221bから出力する。出力されたカウント結果は、端子221bからカムスイッチブロック222に入力される。カムスイッチブロック222及びロガーブロック223は、実施の形態1と同様に動作する。
 以上、説明したように、カウンタブロック221は、ある時刻からクロックブロック229によって生成される周期信号の周期をカウントして、カウント結果を示す参照信号を出力する。そして、カムスイッチブロック222は、カウント結果と条件値とを比較し、ロガーブロック223は、この比較に基づいて記憶領域を切り替えてロギングを継続する。これにより、外部からの入力とは切り離して、ユーザが希望するナノ秒周期のタイミングを生成するとともに、ユーザが領域切替テーブル521の条件値を設定することで、高精度かつ柔軟に、記憶領域を切り替えることが可能になる。
 実施の形態4.
 続いて、実施の形態4について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。上記実施の形態1~3では、参照信号の値に応じて記憶領域が切り替わったが、さらにユーザが記憶領域を直接指定することで、より柔軟にユーザの要望するロギングを達成することができると考えられる。以下では、ユーザによる直接の指示により書込領域を変更する形態について説明する。
 図15に示されるように、本実施の形態に係るデータ制御装置20は、CPUユニット10と共有される共有メモリ291を有する。共有メモリ291は、半導体フラッシュメモリを含む。共有メモリ291は、揮発性であっても不揮発性であってもよいが、データ制御部210の高速な内部処理に合わせて、ある程度高速に応答するストレージであることが好ましい。共有メモリ291は、データ制御装置20のデータ制御部210及び演算部280からの書き込み及び読み出しが可能であり、CPUユニット10から煩雑な通信処理を伴うことなく書き込み及び読み出しが可能である。
 図16には、ロジック回路作成ツール500を利用してユーザにより設定されたロジック回路の作図内容が例示されている。図16に示されるように、ラダープログラム112を実行するCPUユニット10から、カムスイッチブロック222が操作される。詳細には、ラダープログラム112から、カムスイッチブロック222の端子222dに外部操作切替信号を入力する。カムスイッチブロック222は、この信号を受信すると、端子222cに入力されるカウント値の取り込みを遮断して、カウント値を領域切替テーブル521と照合する処理をスキップする。なお、端子222c,222dは、図4に示される端子222bに対応する。
 そして、カムスイッチブロック222は、アクティブなステップ番号を共有メモリ291の特定のアドレスに連結させる。ここで、アクティブなステップ番号は、出力する領域番号に対応するステップ番号を意味する。また、ステップ番号とアドレスの連結は、ステップ番号を、アドレスに格納されている値に同期することを意味する。
 また、CPUユニット10は、共有メモリ291の上記アドレスに、ユーザからの指示値を格納する。カムスイッチブロック222の端子222cに外部操作切替信号が入力されているときに、共有メモリ291の上記アドレスの値がラダープログラム112により強制的に書き換えられると、この値は、直ちにカムスイッチブロック222に反映される。そして、カムスイッチブロック222は、共有メモリ291に書き込まれたステップ番号と、領域切替テーブル521にて対応している領域番号を出力する。
 以上、説明したように、CPUユニット10から領域番号が指定されて、データを書き込む記憶領域が指定される。そして、ロガーブロック223が、デジタル値が書き込まれる記憶領域を、ユーザからの指示値により示される領域に切り替える。具体的には、図3に示される通信インタフェース260が、ユーザによって指示された指示値としてのステップ番号を受信し、ロガーブロック223が、デジタル値を書き込む記憶領域を、このステップ番号に対応する領域に切り替える。これにより、ユーザは、カムスイッチブロック222におけるアクティブなステップ番号を直接操作して、自身が希望するタイミングで記憶領域を指定することができる。
 なお、ユーザからの指示値は、ステップ番号に限られず、領域番号であってもよい。また、カムスイッチブロック222が共有メモリ291を参照することに代えて、ロガーブロック223が共有メモリ291を参照してもよい。ロガーブロック223が参照する場合においては、ロガーブロック223が、外部操作切替信号が入力されたときにカムスイッチブロック222からの入力を遮断して、共有メモリ291に格納された領域番号又はアドレスを取得する。そして、ロガーブロック223は、取得した領域番号と領域ポインタテーブル522において対応する先頭アドレス又は取得したアドレスから順にデジタル値を書き込めばよい。
 実施の形態5.
 続いて、実施の形態5について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。上記実施の形態1では、データが書き込まれる記憶領域が切り替わったが、データが読み出される記憶領域が切り替わる例も考えられる。
 近年、センサの反応速度が高速化したことから、タクトタイムの短縮及びセンサを利用した検査精度の向上のために、センサに入力される検査用のアナログ信号について、より高速で滑らかな波形を出力することが望まれている。そこで、デジタル信号をアナログ信号に変換して出力する技術を利用することが考えられる。例えば、国際公開第2012/042556号には、PLCを構成するD/A変換装置が、内蔵のメモリに時系列で格納されている波形データ列を順次DA(Digital to Analog)変換して、アナログ信号を出力する技術について記載されている。この技術によれば、D/A変換装置は、外部からデジタル信号を取得することがないため、DA変換と同等の短い周期で高速に読み出したデータから滑らかな波形を出力することができる。
 ここで、PLCから機器に出力されるアナログ信号に関しても、出力される波形パターンを種々の信号の値に応じて高速に変更する機能が市場から要求されている。しかしながら、上記技術では、出力されているアナログ信号の波形パターンを変更することについて何ら考慮されていなかった。このため、アナログ信号の出力を一時的に停止させたり、アナログ信号の波形パターンを変更するタイミングを予め定めたりする必要が生じる。このような観点からも、機器と装置との間で伝送される信号に関する処理の利便性を向上させる余地があった。
 以下では、順次デジタル値が読み出される記憶領域を切り替えて、これらデジタル値からDA変換によりアナログ信号を出力する形態について説明する。なお、以下では、PLC100から機器60に出力される信号を出力信号と適宜表記する。機器60からPLC100に入力される入力信号は、デジタル値が読み出される記憶領域を切り換えるために利用される。
 図17に示されるように、本実施の形態に係るロジック回路作成ツール500は、ロジック回路データ511と、記憶部250のデータが読み出される記憶領域を切り替えるための領域切替テーブル521及び領域ポインタテーブル522と、を生成する。領域ポインタテーブル522は、図18に例示されるように、領域番号と、この領域番号に対応する先頭アドレス及びデータ点数と、この領域番号に格納された波形パターンを繰り返し出力する回数と、を関連付けるテーブルデータである。図18に示される繰り返し回数「0」は、繰り返し回数に上限がなく、別途停止の命令があるまで波形の出力を繰り返すことを示す。なお、領域ポインタテーブル522から繰り返し回数を省略してもよい。
 図17に戻り、ロジック回路作成ツール500は、その機能として、予め定められた波形のアナログ信号を出力する設定をするための波形管理部530を有する。波形管理部530は、予め定められた複数の波形を示す波形パターン541と、波形パターン541と領域ポインタテーブル522とを対応させるワークテーブル542と、波形パターン541を記憶部250に格納するための領域格納イメージ543と、を生成する。波形パターン541、ワークテーブル542、及び領域格納イメージ543は、ユーザにより設定されて出力される波形に関する波形情報540を構成する。
 図19,20には、波形管理部530の機能が模式的に示されている。図19に示されるように、波形管理部530は、複数の波形パターン541を作成する。DA変換ブロック214に継続してアナログ信号を出力させるために、このDA変換ブロック214にはデータ列が順次入力される。波形パターン541は、このデータ列を構成するパーツに相当する。波形パターン541は、ゼロから開始する相対アドレスと、波形のサンプリング値に対応するデジタル値と、によって構成される。ユーザは、アドレスとデジタル値を対応付けたテーブルデータによって波形パターン541を規定してもよいし、グラフィックツールを利用して波形を描画することで波形パターン541を設定してもよい。さらに、波形パターン541は、時間の関数の形式で規定されてもよいし、予め定められたパラメータを調節することで指定されてもよい。なお、図19中のP1,P2は、波形パターン541の識別子である。
 また、波形管理部530は、個々の波形パターン541と領域ポインタテーブル522とを、ワークテーブル542により関連付ける。ワークテーブル542は、領域番号と波形パターン541の識別子とを関連付けるテーブルデータである。ユーザは、領域ポインタテーブル522の領域番号それぞれについて、対応する波形パターンを選択することにより、ワークテーブル542を設定する。ワークテーブル542が設定されると、領域ポインタテーブル522の領域番号に対応するデータ点数が、記憶部250に確保される。
 そして、波形管理部530は、図20に示されるように、波形パターン541、ワークテーブル542及び領域ポインタテーブル522から、領域格納イメージ543を生成する。例えば、領域番号「251」に対応する波形パターンP1を構成するデジタル値が、記憶部250の物理アドレス「0」から「999」まで順に格納される。また、領域番号「252」に対応する波形パターンP2を構成するデジタル値が、記憶部250の物理アドレス「2000」から「3999」まで順に格納される。波形管理部530は、このようにして生成した領域格納イメージ543に従って、波形パターン541をすべて記憶部250に展開する。
 図21には、ロジック回路作成ツール500を利用してユーザにより設定されたロジック回路の作図内容が例示されている。図21の例では、カムスイッチブロック222が、カウンタブロック221によるパルスのカウント結果に応じた領域番号を端子222bから波形出力ブロック224の端子224bに出力する。波形出力ブロック224は、デジタル値が読み出される記憶領域を、カムスイッチブロック222による比較に基づいて切り替えて、デジタル値を読み出して出力する出力手段として機能する。
 ユーザは、領域切替テーブル521をカムスイッチブロック222に登録し、領域ポインタテーブル522を波形出力ブロック224に登録する。カムスイッチブロック222は、カウンタブロック221から得たカウント値と、領域切替テーブル521の条件値との比較に基づく領域番号を、波形出力ブロック224に出力する。また、波形出力ブロック224は、内部メモリ270の領域ポインタテーブル522を読み出して、カムスイッチブロック222から出力された領域番号に対応する記憶領域からデジタル値を順次読み出してDA変換ブロック214に出力する。例えば、カムスイッチブロック222から領域番号「252」が出力されている状態において、波形出力ブロック224が、アドレス「2000」から2000個のデータが格納されている領域を参照して、この領域からデジタル値を順次読み出すことが、破線の矢印で示されている。
 そして、波形出力ブロック224は、カムスイッチブロック222から出力される領域番号が切り替わると、デジタル値を読み出す記憶領域を、新たな領域番号に対応する領域に切り替える。この切り替えは、レジスタ224aの実行パラメータにより設定された出力周期で繰り返し実行される。この出力周期は、例えば、データ制御部210の内部制御クロックに同期してもよいし、このクロックの数倍から数十倍の長さであってもよいが、CPUユニット10のスキャンタイムより大幅に短く設定される。
 DA変換ブロック214は、波形出力ブロック224から継続して出力されたデジタル値を取得して、このデジタル値に対応するレベルのアナログ信号を出力する。すなわち、DA変換ブロック214は、デジタル値の推移に対応して、出力するアナログ信号のレベルを変化させる。DA変換ブロック214は、デジタル値を示すデジタル信号に変換するDA変換手段として機能する。変換されたアナログ信号の粒度は、デジタル値の出力周期によって定まる。波形出力ブロック224がCPUユニット10のスキャンタイムより高速にデジタル値を順次読み出して出力するため、より滑らかなアナログ信号が出力されることとなる。DA変換ブロック214から出力されたアナログ信号は、アナログ信号出力インタフェース244によって機器64へ送信される。
 続いて、図21に示される動作が設定されたデータ制御装置20による読み出し処理について説明する。読み出し処理は、図21に示されるように、汎用回路ブロックがそれぞれ、内部制御クロックに同期して処理を実行することにより達成される。ここで、デジタル入力ブロック211、カウンタブロック221、及びカムスイッチブロック222は、実施の形態1と同様に動作する。また、DA変換ブロック214は、内部制御クロックに同期して、波形出力ブロック224から出力されるデジタル値により形成されるデジタル信号のDA変換を実行して、アナログ信号を機器64に出力する。
 続いて、波形出力ブロック224によって実行される波形出力処理について図22を参照して説明する。波形出力処理において、波形出力ブロック224は、領域番号を取得する(ステップS40)。具体的には、波形出力ブロック224は、カムスイッチブロック222から出力されて端子224bに到達している領域番号を取り込む。
 次に、波形出力ブロック224は、カムスイッチブロック222から出力される領域番号に変化があるか否かを判定する(ステップS41)。具体的には、波形出力ブロック224は、ステップS40で取得した領域番号が、波形出力ブロック224が前回データを読み出したときの領域番号と異なるか否かを判定する。領域番号に変化がないと判定した場合(ステップS41;No)、波形出力ブロック224は、ステップS44に処理を移行する。
 一方、領域番号に変化があると判定した場合(ステップS41;Yes)、波形出力ブロック224は、相対ポインタと回数パラメータとをクリアする(ステップS42)。回数パラメータは、波形を繰り返し出力した回数を表すパラメータである。ステップS41の判定が肯定された場合には、新たな記憶領域から波形パターンの読み出しが開始するため、相対ポインタ及び回数パラメータとがゼロに設定される。
 次に、波形出力ブロック224は、ステップS41にて変更されたと判定された領域番号に対応する先頭アドレスを領域ポインタテーブル522から取得する(ステップS43)。
 次に、波形出力ブロック224は、先頭アドレスに相対ポインタを加算することにより、デジタル値の読出位置を特定する(ステップS44)。具体的には、波形出力ブロック224は、現在の読み出し対象である記憶領域の先頭アドレスに相対ポインタを加算することで、デジタル値を読み出すための物理アドレスを特定する。
 次に、波形出力ブロック224は、ステップS44にて特定されたアドレスからデータを読み出してDA変換ブロック214に出力する(ステップS45)。具体的には、波形出力ブロック224は、先頭アドレスに相対ポインタを加算して得たアドレスに格納されているデジタル値を読み出して出力する。
 次に、波形出力ブロック224は、相対ポインタ数に1を加算する(ステップS46)。次に、波形出力ブロック224は、現在の相対ポインタが記憶領域の最後尾に到達しているかを判定する(ステップS47)。具体的には、波形出力ブロック224は、領域ポインタテーブル522を参照して、現在の読み出し対象である記憶領域のデータ点数から1を減じた値と相対ポインタとが等しいか否かを判定する。
 相対ポインタが最後尾に到達していないと判定した場合(ステップS47;No)、波形出力ブロック224は、波形出力処理を終了する。一方、相対ポインタが最後尾に到達していると判定した場合(ステップS47;Yes)、波形出力ブロック224は、領域ポインタテーブル522を参照して、繰り返し回数の設定が無限であるか否かを判定する(ステップS48)。具体的には、波形出力ブロック224は、ステップS45にてデータを読み出したアドレスが属する記憶領域と領域ポインタテーブル522にて関連付けられている繰り返し回数が「0」であるか否かを判定する。
 繰り返し回数の設定が無限であると判定した場合(ステップS48;Yes)、波形出力ブロック224は、相対ポインタをクリアする(ステップS52)。これにより、記憶領域の最後尾までデジタル値が順次読み出された後に記憶領域が変更されることなく波形出力処理が再度実行されたときに、この記憶領域の先頭アドレスから順にデジタル値が再度読み出されて、当該記憶領域の波形パターンが繰り返し出力されることになる。その後、波形出力処理が終了する。
 一方、繰り返し回数の設定が無限でないと判定した場合(ステップS48;No)、波形出力ブロック224は、回数パラメータが繰り返し回数の上限に到達したか否かを判定する(ステップS49)。具体的には、波形出力ブロック224は、領域ポインタテーブル522を参照して、繰り返し回数の設定値と現在の回数パラメータの値とが等しいか否かを判定する。
 回数パラメータが上限に到達していると判定した場合(ステップS49;Yes)、波形出力ブロック224は、波形出力が完了したと判断して(ステップS50)、この記憶領域からの波形パターンの読み出しを終了する。なお、波形出力ブロック224は、他の記憶領域からの読み出しを継続してもよいし、終了してもよい。また、波形出力ブロック224は、波形出力が完了した旨を、CPUユニット10を介してPC50に通知してもよい。その後、波形出力処理が終了する。
 一方、回数パラメータが上限に到達していないと判定した場合(ステップS49;No)、波形出力ブロック224は、回数パラメータに1を加算して(ステップS51)、ステップS52に処理を移行する。
 以上の波形出力処理が、レジスタ224aの実行パラメータにより設定された出力周期で繰り返し実行される。
 以上、説明したように、データ制御装置20は、機器64に接続される。また、データ制御装置20は、領域切替テーブル521と領域ポインタテーブル522とを含む関連情報520を受信する通信インタフェース260と、複数の記憶領域のいずれかから読み出したデジタル値から生成されるアナログ信号を出力するデータ制御部210と、アナログ信号を出力信号として機器64に送信するアナログ信号出力インタフェース244と、を備える。そして、データ制御部210は、カウンタブロック221からカウント結果を示す参照信号を取得して、参照信号の値と領域切替テーブル521の条件値とを比較するカムスイッチブロック222と、デジタル値が読み出される記憶領域を、カムスイッチブロック222による比較に基づいて切り替えて、デジタル値を読み出して出力する波形出力ブロック224と、デジタル値を示すデジタル信号をアナログ信号に変換するDA変換ブロック214と、を有する。
 このため、デジタル値が読み出される記憶領域を、参照信号の値に応じて切り替えることができる。したがって、機器64へ出力するアナログ信号に関する処理の利便性を向上させることができる。具体的には、データ制御装置20は、CPUユニット10のスキャンタイム或いはプログラム処理速度に影響されることなく、参照信号の値に応じて、ハードウェア処理によりナノ秒オーダで記憶領域を高速に切り替えてデータの読み出しを継続することができる。
 また、カムスイッチブロック222及び波形出力ブロック224が比較及び判定をするものとして説明したが、比較演算ブロック225又は論理演算ブロック226がこれらの比較及び判定を実行してもよいし、演算部280がこれらの比較及び判定を実行してもよい。例えば、比較演算ブロック225及び論理演算ブロック226の少なくとも一方が、図22中のステップS41,S47~S49の判定を実行してもよい。
 実施の形態6.
 続いて、実施の形態6について、上述の実施の形態5との相違点を中心に説明する。なお、上記実施の形態5と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。上記実施の形態5では、パルス信号の状態に応じて記憶領域が切り替わったが、アナログ信号の状態に応じて記憶領域を切り替える例も考えられる。以下では、アナログ信号のレベルに応じて記憶領域を切り替える形態について説明する。
 図23には、ロジック回路作成ツール500により作成されたロジック回路の作図内容が例示されている。データ制御装置20は、機器63から出力されるアナログ信号を受信する。詳細には、アナログ信号入力インタフェース243が、機器63から入力されたアナログ信号をデータ制御部210に出力する。そして、図23に示されるように、機器63から出力されるアナログ信号がAD変換ブロック213に入力され、AD変換ブロック213の端子213bから出力されるデジタル信号がカムスイッチブロック222の端子222bに入力される。カムスイッチブロック222及び波形出力ブロック224は、実施の形態5と同様に動作する。
 以上、説明したように、機器63からのアナログ信号に応じて、波形パターンが読み出される記憶領域を切り替える形態においても、データ制御装置20は、実施の形態5と同様の効果を奏する。具体的には、AD変換ブロック213が、このアナログ信号を参照信号としてのデジタル信号に変換することで、参照信号を生成する。そして、データ制御装置20は、参照信号の状態に応じて、記憶領域を高速に切り替えることができる。なお、本実施の形態は、実施の形態1から実施の形態2への変更を実施の形態5に対して施したものといえる。
 実施の形態7.
 続いて、実施の形態7について、上述の実施の形態5との相違点を中心に説明する。なお、上記実施の形態5と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。上記実施の形態5,6では、外部から入力された入力信号に応じて記憶領域が切り替わったが、データ制御装置20の内部で、記憶領域を切り替えるための参照信号を生成する例も考えられる。以下では、データ制御装置20が内ブロックで生成したタイミングで記憶領域を切り替える形態について説明する。
 データ制御部210は、図13に示されるように、汎用回路ブロックとしてクロックブロック229を有する。また、図24には、ロジック回路作成ツール500により作成されたロジック回路の作図内容が例示されている。図24に示されるカウンタブロック221には、ユーザが希望する周期で動作するリングカウンタの機能が設定される。カウンタブロック221は、クロックブロック229のクロックをカウントして、設定された周期にカウント値が到達した場合には、リングカウンタのカウントアップ又はカウントダウンを実行して、カウント値を端子221bから出力する。出力されたカウント結果は、端子222bからカムスイッチブロック222に入力される。カムスイッチブロック222及び波形出力ブロック224は、実施の形態5と同様に動作する。
 以上、説明したように、データ制御装置20は、外部からの入力から切り離される。そして、ユーザが希望するナノ秒周期のタイミングを生成するとともに、ユーザが領域切替テーブル521の条件値を設定することで、データ制御装置20は、高精度かつ柔軟に記憶領域を切り替えることが可能になる。なお、本実施の形態は、実施の形態1から実施の形態3への変更を実施の形態5に対して施したものともいえる。
 実施の形態8.
 続いて、実施の形態8について、上述の実施の形態5との相違点を中心に説明する。なお、上記実施の形態5と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。上記実施の形態5~7では、参照信号の値に応じて記憶領域が切り替わったが、さらにユーザが記憶領域を直接指定してもよい。
 データ制御装置20は、図15に示されるように、共有メモリ291を有する。また、図25には、ロジック回路作成ツール500により作成されたロジック回路の作図内容が例示されている。図25に示されるように、カムスイッチブロック222は、CPUユニット10から外部操作切替信号を受信すると、端子222cに入力されるカウント値の取り込みを遮断して、カウント値を領域切替テーブル521と照合する処理をスキップする。そして、カムスイッチブロック222は、アクティブなステップ番号を共有メモリ291の特定のアドレスに連結させる。CPUユニット10は、共有メモリ291の上記アドレスに、ユーザからの指示値を格納する。カムスイッチブロック222に外部操作切替信号が入力されているときに、共有メモリ291の上記アドレスの値が書き換えられると、この値は、直ちにカムスイッチブロックに反映される。そして、カムスイッチブロック222は、共有メモリ291に書き込まれたステップ番号と、領域切替テーブル521にて対応している領域番号を出力する。
 以上、説明したように、ユーザは、カムスイッチブロック222におけるアクティブなステップ番号を直接操作して、自身が希望するタイミングで記憶領域を指定することができる。なお、本実施の形態は、実施の形態1から実施の形態4への変更を実施の形態5に対して施したものともいえる。
 また、ユーザからの指示値は、ステップ番号に限られず、領域番号であってもよい。また、カムスイッチブロック222が共有メモリ291を参照することに代えて、波形出力ブロック224が共有メモリ291を参照してもよい。波形出力ブロック224が参照する場合においては、波形出力ブロック224が、外部操作切替信号が入力されたときにカムスイッチブロック222からの入力を遮断して、共有メモリ291に格納された領域番号又はアドレスを取得する。そして、波形出力ブロック224は、取得した領域番号と領域ポインタテーブル522において対応する先頭アドレス又は取得したアドレスから順にデジタル値を読み出せばよい。
 以上、本発明の実施の形態について説明したが、本発明は上記実施の形態によって限定されるものではない。
 例えば、上記実施の形態では、機器61~65を別個の機器として説明したが、複数の機器60が1つの装置を構成してもよい。
 また、上記実施の形態では、データ制御装置20が記憶部250を内蔵していたが、これには限定されない。図26に示されるように、データ制御装置20の外付けユニットとして記憶装置2500をデータ制御装置20に接続して、データ制御装置20は、この記憶装置2500に含まれる記憶領域251,252にデータを書き込んでもよいし、これらの領域からデータを読み出してもよい。そして、データ制御装置20は、これらの領域を状況に応じて切り替えてもよい。さらに、記憶領域251,252は、1つの記憶部250又は記憶装置2500に含まれていなくともよい。例えば、データ制御装置20は、記憶部250を内蔵するとともに記憶装置2500に接続されて、記憶部250の記憶領域251と記憶装置2500の記憶領域252とを状況に応じて切り替えてもよい。
 また、上記実施の形態において領域切替テーブル521及び領域ポインタテーブル522は、内部メモリ270に格納されたが、記憶部250に格納されてもよい。
 また、上記実施の形態において、領域切替テーブル521及び領域ポインタテーブル522が、関連情報520を形成したが、これには限定されない。例えば、上記実施の形態1における領域切替テーブル521及び領域ポインタテーブル522を、図27に示されるように1つのテーブルにまとめて、カムスイッチブロック222及びロガーブロック223の双方に登録してもよい。同様に、上記実施の形態5における領域切替テーブル521及び領域ポインタテーブル522を1つのテーブルにまとめて、カムスイッチブロック222及び波形出力ブロック224の双方に登録してもよい。
 データ制御装置20が、ロガーブロック223による書込領域の切り替えと、波形出力ブロック224による読出領域の切り替えと、を同時に実行する場合には、関連情報520において、図28に示されるように領域番号にさらにデータ種別を関連付けておけばよい。データ種別は、各記憶領域について、ロガーブロック223によるロギングの対象となるか波形出力ブロック224による読み出しの対象となるか区別するために用いられる。
 また、上記実施の形態において、カムスイッチブロック222は、領域切替テーブル521に含まれる条件値のうち、参照信号の値より大きい最小の値に関連付けられた領域番号を出力し、ロガーブロック223は、この領域番号と領域ポインタテーブル522において関連付けられた領域に、アクセス対象の記憶領域を切り替えたが、これには限定されない。例えば、カムスイッチブロック222は、領域切替テーブル521に含まれる条件値のうち、参照信号の値より小さい最大の値に関連付けられた領域番号を出力し、ロガーブロック223は、この領域番号に対応する領域に、記憶領域を切り替えてもよい。
 本発明は、本発明の広義の精神と範囲を逸脱することなく、様々な実施の形態及び変形が可能とされるものである。また、上述した実施の形態は、本発明を説明するためのものであり、本発明の範囲を限定するものではない。つまり、本発明の範囲は、実施の形態ではなく、請求の範囲によって示される。そして、請求の範囲内及びそれと同等の発明の意義の範囲内で施される様々な変形が、本発明の範囲内とみなされる。
 本発明は、データの高速な書き込み、又はデータの高速な読み出しに適している。
 1000 PLCシステム、 100 PLC、 10 CPUユニット、 11 メモリ、 111 パラメータ、 112 ラダープログラム、 12 演算部、 13 PCインタフェース、 14 通信インタフェース、 20 データ制御装置、 210 データ制御部、 211 デジタル入力ブロック、 212 デジタル出力ブロック、 213 AD変換ブロック、 214 DA変換ブロック、 221 カウンタブロック、 222 カムスイッチブロック、 223 ロガーブロック、 224 波形出力ブロック、 225 比較演算ブロック、 226 論理演算ブロック、 227 四則演算ブロック、 228 フィルタブロック、 229 クロックブロック、 211a,212a,213a,214a,221a,222a,223a,224a,225a,226a,227a,228a,229a レジスタ、 211b,212b,213b,214b,221b,222b,222c,222d,223b,224b,225b,226b,227b,228b,229b 端子、 230 回路ブロック切替バス、 241 デジタル信号入力インタフェース、 242 デジタル信号出力インタフェース、 243 アナログ信号入力インタフェース、 244 アナログ信号出力インタフェース、 250 記憶部、 251,251a,252,252a 記憶領域、 260 通信インタフェース、 270 内部メモリ、 280 演算部、 290 不揮発性メモリ、 291 共有メモリ、 30 通信バス、 50 PC、 51 エンジニアリングツール、 52 通信インタフェース、 500 ロジック回路作成ツール、 510 設定情報、 511 ロジック回路データ、 512 動作パラメータ、 520 関連情報、 521 領域切替テーブル、 522 領域ポインタテーブル、 530 波形管理部、 540 波形情報、 541 波形パターン、 542 ワークテーブル、 543 領域格納イメージ、 60~65 機器、 61a エンコーダ、 63a レーザ変位センサ、 71 ウェハ、 2500 記憶装置。

Claims (9)

  1.  第1機器及び第2機器に接続されるデータ制御装置であって、
     前記第1機器から機器信号を受信する第1入力インタフェースと、
     記憶手段に含まれる複数の記憶領域それぞれのアドレスと、該記憶領域に関連付けられた条件値と、を示す関連情報を受信する通信インタフェースと、
     前記機器信号から生成されるデジタル値を前記複数の記憶領域のいずれかに書き込むデータ制御手段と、を備え、
     前記データ制御手段は、
     前記第2機器から入力される入力信号から生成される参照信号を取得して、前記参照信号の値と前記条件値とを比較する比較手段と、
     前記デジタル値が書き込まれる前記記憶領域を、前記比較手段による比較に基づいて切り替えて、前記デジタル値を書き込むロガー手段と、を有する、データ制御装置。
  2.  前記ロガー手段は、前記デジタル値が書き込まれる前記記憶領域を、前記条件値のうち前記参照信号の値より大きい最小の値又は前記参照信号の値より小さい最大の値に関連付けられたアドレスの前記記憶領域に切り替える、
     請求項1に記載のデータ制御装置。
  3.  前記入力信号を受信する第2入力インタフェース、をさらに備え、
     前記入力信号は、パルス信号であって、
     前記データ制御手段は、前記パルス信号に含まれるパルスの数をカウントして、カウント結果を示す前記参照信号を出力するカウンタ手段をさらに有する、
     請求項1又は2に記載のデータ制御装置。
  4.  前記機器信号及び前記入力信号は、アナログ信号であって、
     前記参照信号は、デジタル信号であって、
     前記第1入力インタフェースは、前記入力信号を受信し、
     前記データ制御手段は、前記機器信号のレベルを前記デジタル値に変換し、前記入力信号を前記参照信号に変換するAD変換手段、をさらに有する、

     請求項1又は2に記載のデータ制御装置。
  5.  前記通信インタフェースは、ユーザによって指示された指示値を受信し、
     前記ロガー手段は、前記通信インタフェースによって前記指示値が受信された場合に、前記デジタル値が書き込まれる前記記憶領域を、前記指示値により示される領域に切り替える、
     請求項1から4のいずれか一項に記載のデータ制御装置。
  6.  第1機器及び第2機器に接続されるデータ制御装置であって、
     記憶手段に含まれる複数の記憶領域それぞれのアドレスと、該記憶領域に関連付けられた条件値と、を示す関連情報を受信する通信インタフェースと、
     前記複数の記憶領域のいずれかからデジタル値を読み出して、該デジタル値から生成される出力信号を出力するデータ制御手段と、
     前記出力信号を前記第1機器に送信する出力インタフェースと、を備え、
     前記データ制御手段は、
     前記第2機器から入力される入力信号から生成される参照信号を取得して、前記参照信号の値と前記条件値とを比較する比較手段と、
     前記デジタル値が読み出される前記記憶領域を、前記比較手段による比較に基づいて切り替えて、前記デジタル値を読み出して出力する出力手段と、を有する、データ制御装置。
  7.  請求項1から6のいずれか一項に記載のデータ制御装置と、
     前記データ制御装置の動作を前記データ制御装置に指示するCPUユニットと、
     を備えるプログラマブルロジックコントローラ。
  8.  第1機器から出力される機器信号から生成されるデジタル値を複数の記憶領域のいずれかに書き込むステップと、
     前記複数の記憶領域それぞれのアドレスと、該記憶領域に関連付けられた条件値と、を示す関連情報を受信するステップと、
     第2機器から出力される信号から生成される参照信号の値と前記条件値とを比較するステップと、
     前記デジタル値が書き込まれる前記記憶領域を、前記比較に基づいて切り替えるステップと、
     を含むデータ制御方法。
  9.  デジタル値を複数の記憶領域のいずれかから読み出して出力するステップと、
     前記複数の記憶領域それぞれのアドレスと、該記憶領域に関連付けられた条件値と、を示す関連情報を受信するステップと、
     機器から出力される信号から生成される参照信号の値と前記条件値とを比較するステップと、
     前記デジタル値が読み出される前記記憶領域を、前記比較に基づいて切り替えるステップと、
     前記デジタル値から生成される出力信号を出力するステップと、
     を含むデータ制御方法。
PCT/JP2018/043198 2018-11-22 2018-11-22 データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法 WO2020105173A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201880099582.XA CN113056711B (zh) 2018-11-22 2018-11-22 输入输出控制单元、plc及数据控制方法
JP2019528776A JP6625278B1 (ja) 2018-11-22 2018-11-22 入出力制御ユニット、plc及びデータ制御方法
PCT/JP2018/043198 WO2020105173A1 (ja) 2018-11-22 2018-11-22 データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法
US17/281,250 US11275356B2 (en) 2018-11-22 2018-11-22 Input-output control unit, PLC and data control method
TW108122237A TWI702799B (zh) 2018-11-22 2019-06-26 資料控制裝置、可程式邏輯控制器及資料控制裝置的資料控制方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/043198 WO2020105173A1 (ja) 2018-11-22 2018-11-22 データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法

Publications (1)

Publication Number Publication Date
WO2020105173A1 true WO2020105173A1 (ja) 2020-05-28

Family

ID=69100982

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/043198 WO2020105173A1 (ja) 2018-11-22 2018-11-22 データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法

Country Status (5)

Country Link
US (1) US11275356B2 (ja)
JP (1) JP6625278B1 (ja)
CN (1) CN113056711B (ja)
TW (1) TWI702799B (ja)
WO (1) WO2020105173A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112019007572T5 (de) * 2019-07-26 2022-04-28 Mitsubishi Electric Corporation Speicherprogrammierbare Steuerung, Einstellwerkzeug und Programm
CN114442582B (zh) * 2022-04-07 2022-08-16 广东祥利科技有限公司 一种聚烯烃改性电缆粒料生产监测控制方法及系统

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014064846A1 (ja) * 2012-10-26 2014-05-01 三菱電機株式会社 アナログ変換装置およびプログラマブルコントローラシステム
JP2017138820A (ja) * 2016-02-04 2017-08-10 株式会社Kmc 生産情報収集システム

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5845149A (en) * 1996-04-10 1998-12-01 Allen Bradley Company, Llc Industrial controller with I/O mapping table for linking software addresses to physical network addresses
EP1355265B1 (en) * 2002-04-15 2016-04-13 Canon Kabushiki Kaisha Colour data buffering for colour printing
US6693824B2 (en) * 2002-06-28 2004-02-17 Motorola, Inc. Circuit and method of writing a toggle memory
TWI220700B (en) * 2003-08-20 2004-09-01 Delta Electronics Inc Programmable logic controller with an auxiliary processing unit
JP2006146467A (ja) * 2004-11-18 2006-06-08 Matsushita Electric Ind Co Ltd 記録媒体及び記憶領域切り替え方法
WO2010109584A1 (ja) 2009-03-23 2010-09-30 三菱電機株式会社 A/d変換装置およびプログラマブルコントローラシステム
WO2012042556A1 (ja) 2010-09-28 2012-04-05 三菱電機株式会社 D/a変換装置、周辺装置、及びplc
US9323235B2 (en) * 2011-04-11 2016-04-26 Rockwell Automation Technologies, Inc. Industrial control system with distributed motion planning
US8856406B2 (en) * 2011-09-14 2014-10-07 Microchip Technology Incorporated Peripheral trigger generator
US10303149B2 (en) 2015-01-28 2019-05-28 Mitsubishi Electric Corporation Intelligent function unit and programmable logic controller system
DE112015006089T5 (de) 2015-01-30 2017-10-19 Mitsubishi Electric Corporation A/D-Wandler, D/A-Wandler und speicherprogrammierbare Steuerung
WO2017183192A1 (ja) 2016-04-22 2017-10-26 三菱電機株式会社 デジタルアナログ変換装置、制御装置、及び制御システム
ES2976486T3 (es) 2016-08-09 2024-08-02 Tomologic Ab Sistema para la optimización del funcionamiento de máquinas industriales mediante la modificación de la introducción de parámetros de proceso estándar

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014064846A1 (ja) * 2012-10-26 2014-05-01 三菱電機株式会社 アナログ変換装置およびプログラマブルコントローラシステム
JP2017138820A (ja) * 2016-02-04 2017-08-10 株式会社Kmc 生産情報収集システム

Also Published As

Publication number Publication date
US20210311459A1 (en) 2021-10-07
TW202021286A (zh) 2020-06-01
TWI702799B (zh) 2020-08-21
JPWO2020105173A1 (ja) 2021-02-15
CN113056711A (zh) 2021-06-29
CN113056711B (zh) 2022-04-15
US11275356B2 (en) 2022-03-15
JP6625278B1 (ja) 2019-12-25

Similar Documents

Publication Publication Date Title
WO2020105173A1 (ja) データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法
JP7072531B2 (ja) 異常検出装置および異常検出方法
US10831170B2 (en) Control system, control device, coupling method, and computer program
JP4814365B2 (ja) 加工プログラムやバイナリデータが記憶されているメモリの領域を分割・結合することが可能な数値制御装置
JP6747104B2 (ja) セーフティシステム、プログラム、および方法
CN111857029B (zh) 一种数据采集的方法、系统、装置、终端设备及介质
US20020045968A1 (en) NC machining simulation apparatus
US11137740B2 (en) Numerical controller and method for determining look-ahead variable
JP6010094B2 (ja) サイクルタイムに係るパラメータ設定支援機能を有する数値制御装置
JP6599032B1 (ja) 入出力制御ユニット、プログラマブルロジックコントローラおよび検査システム
CN108345264A (zh) 可编程控制器
ATE487926T1 (de) Positionsgeber-überwachungsverfahren
JP2004318378A (ja) 数値制御装置
CN108693837A (zh) 信息处理装置
KR101333639B1 (ko) 머신코드 생성 방식을 이용한 원격감시제어장치의 설비 제어방법 및 그 원격감시제어장치
Campos-Rebelo et al. Enhanced event modeling for human-system interactions using IOPT petri nets
JP6783034B1 (ja) プログラマブルロジックコントローラ、コンピュータ、方法、及びプログラム
CN113064376B (zh) 生产系统、生产方法以及信息存储介质
CN104865890B (zh) 进行基于表格式数据的运转的数值控制装置
CN103761071B (zh) 一种plc的指令编码及识别系统
KR20160014104A (ko) 기능 유닛, 아날로그 입력 유닛, 프로그래머블 컨트롤러 시스템
JP7263994B2 (ja) 情報処理方法及び最適化プログラム
CN110794758B (zh) 追踪装置
US20220206453A1 (en) Program creation device, program creation method, and program
CN111459791A (zh) 测试模式生成装置

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019528776

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18940486

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18940486

Country of ref document: EP

Kind code of ref document: A1