WO1998047073A1 - Data processor, data processing method, and data processing system - Google Patents

Data processor, data processing method, and data processing system Download PDF

Info

Publication number
WO1998047073A1
WO1998047073A1 PCT/JP1997/001275 JP9701275W WO9847073A1 WO 1998047073 A1 WO1998047073 A1 WO 1998047073A1 JP 9701275 W JP9701275 W JP 9701275W WO 9847073 A1 WO9847073 A1 WO 9847073A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
plc
shared memory
device data
setting
Prior art date
Application number
PCT/JP1997/001275
Other languages
French (fr)
Japanese (ja)
Inventor
Masayuki Taniguchi
Mayumi Ojima
Atsushi Mase
Kazuhiro Iwamoto
Haruki Kawamura
Toshihiko Ogiso
Kentarou Morikami
Original Assignee
Mitsubishi Denki Kabushiki Kaisha
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 Mitsubishi Denki Kabushiki Kaisha filed Critical Mitsubishi Denki Kabushiki Kaisha
Priority to PCT/JP1997/001275 priority Critical patent/WO1998047073A1/en
Priority to GB9924381A priority patent/GB2339940B/en
Priority to DE19782267T priority patent/DE19782267T1/en
Publication of WO1998047073A1 publication Critical patent/WO1998047073A1/en
Priority to HK00104726A priority patent/HK1025410A1/en

Links

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/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/10Plc systems
    • G05B2219/15Plc structure of the system
    • G05B2219/15028Controller and device have several formats and protocols, select common one

Definitions

  • the present invention relates to a data processing device, a processing method, and a data processing system for collecting and setting data with a device to be controlled via a communication line.
  • FIG. 34 is a block diagram showing the configuration of a conventional data processing apparatus.
  • reference numeral 200 denotes an input / output device such as a CRT 2 and a keyboard 3, and a communication line 5 based on different communication protocols.
  • This is a controller that controls a plurality of PLCs (Programmable Logic Controllers) 4 connected by a PC.
  • PLCs Protein Logic Controllers
  • the communication lines are described as three (communication lines 5a, 5b, 5c) corresponding to each PLC 4 (PLCs 4a, 4b, 4c).
  • the controller 200 executes a user program 221 such as a PLC device data collection / setting program developed in the memory 220, the CPU 210 and the interface 210 with the CRT 2 231, It consists of an interface 232 with the keypad 3 and interfaces 24 1, 242 and 243 with the PLCs 4a, 4b and 4c connected by different communication protocols.
  • a user program 221 such as a PLC device data collection / setting program developed in the memory 220, the CPU 210 and the interface 210 with the CRT 2 231, It consists of an interface 232 with the keypad 3 and interfaces 24 1, 242 and 243 with the PLCs 4a, 4b and 4c connected by different communication protocols.
  • FIG. 35 is a memory state diagram of the PLCs 4a, 4b, and 4c.
  • reference numeral 40 denotes a memory of the PLC 4
  • 41 denotes device data stored in the memory.
  • Each of the PLCs 4a, 4b, and 4c has a memory 40a, 40b, and 40c, respectively. 1a, 41, and 41c are stored.
  • FIG. 36 is a flow chart for collecting data from the PLC 4 connected by the conventional different communication line, and shows the product number data of the device area 41 a from the memory 40 a of the PLC 4 a.
  • Fig. 37 is a flow chart for setting data for PLC 4 connected by a conventional different communication line, and the product number in device area 41 a of memory 40a of PLC 4a.
  • Devices W0 to W99, which are all overnight, then devices D0 to D49, which are the number of completed production units in device area 41 of memory 40b of PLC 4b, then devices of memory 40c of PLC 4c The figure shows the operation of the user program when setting data in the order of devices R10 to 20 which are measurement value data in the area 41c.
  • step S1601 the user sets, as a user program, a communication protocol for the controller 200 to communicate with the PLC 4a, and device data collected from the PLC 4a ( Communication data such as designation of devices WO to W99), which are product number data, and a collection destination user buffer and collection timing of the collected device device are created, and the process proceeds to step S1602.
  • step S 602 the communication line 5 a is opened according to the communication protocol with the PLC 4 a based on the created communication data, and the process proceeds to step S 603.
  • step S1603 data is collected from the PLC 4a for devices W0 to W99, which are product number data, and stored in the specified user buffer.
  • step S1604 the communication line 5a is closed according to the communication protocol with the PLC 4a based on the communication data.
  • step S1605 it is determined whether or not collection of all device data has been completed. In this case, since the data on the number of completed products and the data on the measured values have not yet been collected from PLC 4b and PLC 4c, the process returns to step S1601 to collect data on the number of completed products. From step S 1601, data S 1 to D 49 of completed production number are collected in step S 1604.
  • step S166 it is determined whether a series of data collection is completed. If the device data of the PLC is to be collected continuously, go to step S1667, for example, wait for any timing to be the next scan, and then go to the next scan, that is, the next data collection, and Collect data for 4a, 4b, 4c.
  • the arbitrary timing is a fixed time interval or a change in the device data content of the PLC.
  • step S166 if the termination condition is met, a series of
  • the PLC device data collection processing ends.
  • FIG. 34 a conventional data setting method will be described with reference to FIGS. 34, 35, and 37.
  • the data of the devices WO to W99, which are the product number data are stored in the PLC 4a, and the data of the devices D0 to D49, which are the number of completed production units, in the PLC 4b.
  • the data of the devices R10 to R20, which are the measurement value data are set in the PLC 4c.
  • data of devices W0 to W99, which are product number data of the PLC 4a are set.
  • step S1701 the user sets, as a user program, a communication protocol for the controller 200 to communicate with the PLC 4a, and sets the PLC 4a.
  • Communication data such as the specification of the user buffer where data is stored and the device data to be set in the PLC 4a (devices WO to W99, which is the product number data) and the timing of setting.
  • An evening is created by a user program, and the flow shifts to step S1702.
  • step S1702 the communication line 5a is opened according to the communication protocol with the PLC 4a, and the flow shifts to step S1703.
  • step S1703 the device WO-W99, which is the product number data, is actually set from the user buffer specified for the PLC 4a.
  • step S1704 the communication line 5a is closed according to the communication protocol with the PLC 4a.
  • step S1705 it is determined whether or not all device data settings have been completed. In this case, since the production completed number data and the measured value data have not yet been set for the PLC 4b and the PLC 4c, the process returns to step S1701 to set the production completed number data. From S1701, the number of completed production units D1 to D49 is set by steps S1704.
  • step S 1706 it is determined whether a series of data settings has been completed.
  • step S1707 it is determined whether a series of data settings has been completed.
  • step S1707 wait for an arbitrary timing to be the next scan, and then go to the next scan, that is, move to the next data setting.
  • PLC 4a, 4b, and 4c are set overnight.
  • the arbitrary timing is a fixed time interval or a change in the contents of the device data of the PLC.
  • step S1706 if the termination condition is met, a series of
  • FIG. 38 is a block diagram showing a configuration of a conventional data collection device, showing a case where two controllers are provided.
  • two controllers 200 and 201 are provided, and are respectively connected by the same communication protocol via a communication line 5 e by a protocol E I / F 245.
  • the controller 200 is connected to the PLC 4a by the IZF 241 for protocol A and the communication line 5a, and the controller 201 is connected to the PLC 4d by the IZF 234 for protocol D and the communication line 5d. It is connected.
  • controller 200 performs data collection Z setting and the like based on the user program 222 in the memory 220.
  • the other configuration is the same as that of the above-described conventional technology, and thus the description is omitted.
  • Fig. 39 shows controllers 200 and 2 connected by communication line 5e.
  • step S1801 the user, as a user program, communicates with the controller 201 to communicate with the PLC 4d, that is, the controller 201 communicates with the PLC 4d.
  • a communication data for the controller 200 to communicate with the PLC 4a.
  • —Evening that is, a communication protocol setting for the controller 200 to communicate with the PLC 4a, and a user buffer that stores data to be set for the PLC 4a and a device to be set for the PLC 4a Create communication data such as the specification of the data (device W0 to W99, which is the product number data) and the timing of the setting.
  • step S1802 the communication line 5e is opened according to the communication protocol between the controller 200 and the controller 201, and the flow shifts to step S1803.
  • step S1803 a request for data collection of the devices WO to W99, which are the product numbers of the PLC 4d, is sent from the controller 201 to the controller 200 via the opened communication line 5e.
  • the controller 201 created in S1801 transmits communication data for communicating with the PLC 4d, and the flow shifts to step S1804.
  • step S 1804 a communication protocol between the controller 201 and the PLC 4 d is set based on the communication data transmitted from the controller 200.
  • the communication line 5d is opened in accordance with the rules, and the flow shifts to step S1805.
  • step S1805 data of devices W100 to W199, which are product number data, is actually collected from the PLC 4d, and is temporarily stored in the memory 220 of the controller 201.
  • step S1806 by communicating between the controller 200 and the controller 201, the devices W100 to W19 stored in the memory 220 in the controller 201 are communicated. 9 is transferred to the memory 220 in the controller 200, and the flow shifts to step S1807.
  • step S1807 the communication line 5d opened according to the communication protocol between the controller 201 and the PLC 4d is closed, and the flow shifts to step S1808.
  • step S1808 the communication line 5e opened according to the communication protocol between the controller 200 and the controller 201 is closed.
  • step S1810 communication between the controller 200 and the PLC 4a is performed, and the device number data W100 to W which is the product number data stored in the memory 220 inside the controller 200 is transmitted.
  • 199 is set in the area 41a of the memory 40a inside the PLC 4a, and is set as devices W0 to W99.
  • step S1811 the communication line 5a is closed in accordance with the communication protocol with the PLC 4a, and a series of products inside the PLC 4d connected to the series of controllers 201. The process of transferring the number data to the PLC 4a connected to the controller 200 via the communication line ends.
  • the controller receives the data from each PLC.
  • the user program must create communication data according to the dedicated communication protocol corresponding to each PLC to communicate with each PLC, which requires expertise in the communication protocol.
  • a program is enlarged and performance is deteriorated because communication data such as opening and closing of a communication line is created according to different dedicated communication protocols.
  • the controllers are connected via a communication line, and the data collection between the PLCs connected to each controller is performed.
  • the Z setting method the memory inside the PLC is accessed and the data It is necessary to set the data collection Z settings for each controller, such as from the controller that collected the data to the controller and collected the data from the controller to another controller, and further to the PLC connected to the other controller.
  • the user program for performing the acquisition and setting is complicated and bloated, and the memory of the PLC connected to the controller is bothersome to collect and set data between controllers. I had to create a user program to do this.
  • the present invention has been made to solve the above-described problems, and has been made in consideration of the difficulty in creating a complicated and sophisticated user program without having to create a sophisticated user program between a controller and a PLC connected to the controller. It is an object of the present invention to provide a data processing device, a processing method, and a data processing system capable of performing overnight processing.
  • a communication protocol storage unit that stores, in advance, for each of the control target devices, a communication protocol with a control target device connected via a communication line;
  • Device owned by the controlled device according to the communication protocol stored in the storage means
  • Device data processing means for collecting data or setting device data for the controlled device, and storing the device data collected by the device data processing device or device data set for the controlled device
  • a data transfer means for transferring the device data between the shared memory area and a designated user buffer.
  • the device data processing means must have a refresh control function for collecting device data held by the controlled device or setting device data to the controlled device at a predetermined timing. did. Further, the device data processing means reads a predetermined timing for performing the refresh control from a setting data file in which data is set as a parameter.
  • the data transmission / reception means is to perform all data transmission / reception between the shared memory area and the designated user buffer by the communication means set in advance.
  • the data transfer means transfers device data between the shared memory area and the user buffer every time the value of the device data is changed.
  • the shared memory area is divided into blocks and stored for each device data of each device to be controlled.
  • Equipment A data processing method comprising: storing device data to be specified in a shared memory area; and transmitting and receiving the device data between the shared memory area and a designated user buffer.
  • the process of storing the device data collected from the control target device or the device data set for the control target device in the shared memory area is performed at a predetermined timing set in advance.
  • the controller in which a controller connected to a control target device via a first communication line is connected to a plurality of controllers via a second communication line, the controller includes: Device data overnight processing means for collecting the device data held by the controlled device or setting the device data to the controlled device in accordance with the communication protocol in the first communication line; Sending and receiving the device data between the shared memory area for storing the device data collected by the means or the device data to be set in the controlled device, and the user buffer designated by the shared memory area; And a second communication protocol storage means for storing in advance a communication protocol of the second communication line. Transmitting means for transmitting the device data stored in the shared memory area via the second communication line according to the communication protocol of the second communication line stored in the second communication protocol storage means; And a writing means for storing the device data transmitted via the second communication line in the shared memory area.
  • a first communication protocol storage means for previously storing, for each of the control target devices, a first communication protocol with the control target device connected via the first communication line.
  • the device data processing means is a device owned by the device to be controlled. It has a refresh control function that collects data overnight or sets device data to the control target equipment in a predetermined evening sequence.
  • the transmitting means transmits the device data at a predetermined timing via the second communication line based on the parameters stored in the shared memory area.
  • the transmitting means is operated at a certain interval from the starting means operating based on the predetermined parameters.
  • the data transmitted via the second communication line is a parameter or device data
  • the data is stored in the parameter storage area on the shared memory.
  • FIG. 1 is a block diagram showing a configuration of a data collection device according to a first embodiment of the present invention.
  • FIG. 2 is a functional diagram showing functions of a data collection unit according to the first embodiment of the present invention.
  • FIG. 3 is a flowchart showing the operation of the shared memory data collecting means provided inside the data collecting means according to the first embodiment of the present invention.
  • FIG. 4 is a flowchart showing an operation of the device data collecting means provided inside the data collecting means according to the first embodiment of the present invention for collecting data from the PLC.
  • FIG. 5 is a memory configuration diagram showing the contents of the shared memory according to the first embodiment of the present invention.
  • FIG. 6 is a block diagram showing a configuration of a data setting device according to a second embodiment of the present invention.
  • FIG. 7 is a functional diagram showing functions of data setting means according to Embodiment 2 of the present invention.
  • FIG. 10 is a memory configuration diagram showing the contents of the shared memory according to the second embodiment of the present invention.
  • FIG. 11 is a block diagram showing a configuration of a refresh-type data collecting apparatus according to Embodiment 3 of the present invention.
  • FIG. 12 is a functional diagram showing the function of the refresh type data collecting means according to the third embodiment of the present invention.
  • FIG. 13 is a flowchart showing the operation of the shared memory data collecting means provided inside the refresh type data collecting means according to the third embodiment of the present invention.
  • FIG. 14 is a flowchart showing the operation of the device data collection and refresh means provided inside the data collection means according to the third embodiment of the present invention for collecting data from the PLC.
  • FIG. 15 is a block diagram showing the configuration of a refresh type data setting device according to Embodiment 4 of the present invention.
  • FIG. 16 is a functional diagram showing the function of the refresh type data setting means according to Embodiment 4 of the present invention.
  • FIG. 17 is a flowchart showing the operation of the shared memory data setting means provided inside the refresh type data setting means according to the fourth embodiment of the present invention.
  • FIG. 18 is a flow chart showing an operation for setting data to the PLC by the device data setting refresh means provided inside the refresh data setting means according to the fourth embodiment of the present invention. .
  • FIG. 19 is a block diagram showing a configuration of a data collection device according to Embodiment 5 of the present invention.
  • FIG. 20 is a functional diagram showing the function of the data collection means according to Embodiment 5 of the present invention.
  • FIG. 21 is a flowchart showing the operation of the protocol A device data collection means, the protocol B device data collection means, and the protocol C device data collection means according to the fifth embodiment of the present invention.
  • FIG. 22 is a diagram showing a database format file in an auxiliary storage device for storing data with an interval set for collecting PLC device data according to the fifth embodiment of the present invention. .
  • FIG. 23 is a system configuration diagram showing a system configuration of a data collection device according to Embodiment 6 of the present invention.
  • FIG. 24 is a functional diagram showing functions of a data collection unit according to Embodiment 6 of the present invention.
  • FIG. 25 is a diagram showing the contents of the device refresh parameter set on the shared memory by the user according to the sixth embodiment of the present invention.
  • FIG. 26 is a diagram showing an example of a device write request transmission data content to be transferred to another controller according to the sixth embodiment of the present invention.
  • FIG. 27 shows a means for activating a write request transmitting means to another controller in the own controller device data at regular intervals according to the refresh parameter according to the sixth embodiment of the present invention.
  • 5 is a flowchart showing the operation of the first embodiment.
  • FIG. 28 is a flow chart showing the operation of a means for transmitting a write request to another controller in the own controller device data at regular intervals according to the refresh parameter according to the sixth embodiment of the present invention. is there.
  • FIG. 29 is a flowchart showing the operation of a means for receiving a write request from another controller and writing the same in the shared memory according to the sixth embodiment of the present invention.
  • FIG. 30 is a functional diagram showing the function of the refresh parameter setting unit according to the seventh embodiment of the present invention.
  • FIG. 31 is a flowchart showing the operation of the means for transferring the device refresh parameter data to another controller according to the seventh embodiment of the present invention.
  • FIG. 32 is a flowchart showing the operation of the means for writing data from another controller to the shared memory according to the seventh embodiment of the present invention.
  • FIG. 33 is a flow chart showing the operation of a user program for setting device refresh parameter overnight data in a shared memory according to Embodiment 7 of the present invention.
  • FIG. 34 is a block diagram showing the configuration of a conventional data collection device.
  • FIG. 35 is a memory state diagram of PLC 4a, 4b, 4c.
  • Fig. 36 shows data from PLC 4 connected via a different conventional communication line. Is a flow chart for collecting the information.
  • FIG. 37 is a flowchart for setting a default for PLC 4 connected by a conventional different communication line.
  • FIG. 38 is a block diagram showing the configuration of a conventional data collection device.
  • Fig. 39 shows controllers 200 and 2 connected by communication line 5e.
  • Embodiment 1 of the present invention relating to a data collection method will be described with reference to FIG. 1 to FIG.
  • FIG. 1 is a block diagram showing a configuration of a data collection device of the present invention.
  • reference numeral 100 denotes a controller for controlling a CRT 2 and a keyboard 3 which are input / output devices, and a PLC 4 (PLC 4a, PLC 4b, PLC 4c) connected by different communication means.
  • PLC 4a, PLC 4b, PLC 4c PLC 4a, PLC 4b, PLC 4c
  • FIG. 2 is a functional diagram showing the function of the data collection means 122 operating in the memory 120 of FIG. 4 &, 4b, 4 Shared memory for storing device data held by c.
  • 1 2 2 2 is a device for exchanging device data between the shared memory 1 2 2 1 and a designated user buffer.
  • 1 2 2 3 are device data collection means as device data processing means having communication protocol storage means for storing the communication protocol of the PLC 4;
  • FIG. 3 is a flowchart showing the operation of the shared memory data collection means 122 provided inside the data collection means 122, wherein the user program 122 is composed of the shared memory data collection means 122.
  • 2 Call 2 and start from PLCs 4a, 4b, and 4 connected by different communication lines, first, production of device WO-W99, which is the product number data of PLC 4a, and then completion of production of PLC 4b
  • User program 1 2 1 and shared memory for collecting device data in order of device data D 0 to D 49, and then to device R 1 0 to 20 which is the measured value data of PLC 4 c 5 is a flowchart showing the operation of the data collection means 122.
  • FIG. 4 is a flowchart showing the operation of the device data collection means 1223 provided inside the data collection means 122 for collecting data from the PLC 4.
  • FIG. 5 is a memory configuration diagram showing the contents of the shared memory 10.
  • the user allocates the device data to be collected, that is, the PLC that stores the device data, the collection storage destination user buffer that stores the collected device data, and the device data storage area on the shared memory area 1221. Specify interactively.
  • the CPU 110 instructs the device data collection means 1 223 a, 1 223 b, and 122 3 c with the PLC specified by the user and starts up. To be applied.
  • the device data collection means 1 223a, 1223b, and 1223c actually communicate with the PLCs 4a, 4b, and 4c according to each communication protocol stored inside, and b, 4 Collect device data from c and store it in shared memory 1221.
  • the shared memory data collection means 1 222 is composed of the PLCs 4 a, 4 b, and 4 c collected by the device data collection means 1 2 23 a, 1 223 b, and 122 3 c and stored in the shared memory 122 1. Device data in the user buffer specified by the user.
  • the user only needs to specify the PLC from which the device data is to be collected, the collection and storage destination user buffer for storing the device data, and the device data storage area in the shared memory area 1221, so that the device data of the specified PLC can be collected. Evening can be collected.
  • the operation of the data processing device that is, the data of the devices W0 to W99, which is the product number data
  • the data of the devices D0 to D49, which are the production completed number data are output from the PLC 4b.
  • the operation for collecting the data of the devices R10 to 20 as the measurement data from the PLC 4c will be described in detail with reference to FIGS.
  • the user specifies the PLC in which the device data to be collected is stored, and also specifies the collection storage destination user buffer for storing the collected device data and the device data storage area in the shared memory area 122 1 Create a user program to specify the password and write it to the memory 120, and end the user's own processing.
  • the data of the devices W0 to W99 which are the product number data
  • the data of the devices W0 to W99 are collected from the PLC 4a and stored in the user buffer at the collection storage destination, and the production completed number data is collected from the PLC 4b.
  • This is the task of collecting data and storing it in an arbitrary user buffer for collection and storage.
  • the user repeats the specification of the PLC in which the device data is stored, the specification of the user buffer for collection and storage, and the specification of the device data storage area on the shared memory area 1221, three times.
  • step S101 the user program written by the user sends to the shared memory data collection means 1222 a device WO to W99, which is the product number data to be collected from the PLC 4a, temporarily.
  • the shared memory data collection means 1 indicates the device data storage area 1 2 2 1a for the PLC 4a on the shared memory area 1 2 2 1 and the collection storage destination user buffer to be finally stored. Call 2 2 2 and go to step S 102.
  • the shared memory data collection means 1222 stores the data corresponding to the PLC connected to the controller 100 in advance.
  • the communication protocol that actually communicates with the PLC 4a that is, the protocol A device data collection means 1 2 2 3a, is selected from among the communication protocols used, and the protocol A device data collection means 1 is selected.
  • For 2 23 a indicate the storage area 1 2 2 1 a on the shared memory that temporarily stores the device data to be collected from the PLC 4 a and the device data collected from the PLC 4 a.
  • the operation of the device data collection means 122 a will be described later), and the process proceeds to step S103.
  • step S103 the device data collection device for protocol A 1 2 2 3a stored from the PLC 4a device data storage area 1 2 2 1a inside the shared memory 1 2 2 1 1
  • the data of the devices WO to W99, which is the product number data, is stored in the user buffer specified by the user by the user program.
  • step S101 to step S103 the device WO-W99, which is the product number from the PLC 4a, is stored in the collection storage destination user designated by the user. A series of operations for storing data in one buffer is completed.
  • step S104 the user program 1 2 1 2 sends the shared memory data collection means 1 2 2 2 D 0 to D 49 and the shared memory area 1 2 2 1
  • the device data storage area 1 2 2 1 b for PLC 4 b and the collection storage destination user buffer are specified, and the shared memory data collection means 1 Call 2 2 2
  • step S105 the shared memory data collection means 1 222 responds to the device data collection means 1 223b for protocol B, and the device data storage areas 1221 b and PLC 4 b to be collected from the PLC 4b.
  • the storage area 1221 b of the device data on the shared memory is designated, and the device data collection means 1 223 b for protocol B is started.
  • step S106 the user program 12 1 stores the protocol B device data collection means 1223b from the PLC 4b device data storage area 1221 of the shared memory 1221. Then, the user program 122 collects the data of the devices D0 to D49, which are the product number data, in the shared memory data collection means 1222 in the storage destination user buffer. This completes the data collection for devices D0 to D49, which is the product number data from PLC 4b.
  • step S 107 the user program 121 executes the shared memory data collection means 1 222.
  • the device R10 to 20 which is the measurement data to be collected from the PLC 4c
  • the device data storage area 1221c for the PLC 4C on the shared memory area 1221 and The user specifies the collection / storage destination user buffer and calls the shared memory data collection means 1 222.
  • step S 108 the shared memory data collection means 1 222 stores the device data storage area to be collected from the PLC 4 c in contrast to the device data collection means 122 3 c for protocol C. And the PLC 4c device Instruct the storage area 1221c on the shared memory of the device memory and start the device data collection means 1223c for protocol C.
  • step S109 the user program 1221 reads the shared memory 1221 from the PLC 4C device data storage area 1221c.
  • Protocol C Device data overnight collection means 1
  • User data 1 2 1 collects and stores the data of device R 10 to 20 as measurement value data stored in 223 c using shared memory data collection means 1 222 Collect in the first user buffer. This completes the data collection of the devices R10 to R20, which are the product number data from the PLC 4c.
  • the device data collection means 1 223a, 1 223b, and 1223c are different from each other only in the protocol, and have the same processing procedure. Therefore, the device data collection means for protocol A 1 223a The operation is explained using.
  • the data of the devices W0 to W99, which are the product numbers, from the PLC 4a by the shared memory data collection means 1222 are collected.
  • the device collection device 1223a is activated.
  • step S201 the protocol A device data collection means 1 223a opens the communication line 5a in accordance with the protocol A communication procedure with the PLC 4a stored therein.
  • step S202 communication is performed with the PLC 4a to collect data 41a of the devices W0 to W99, which are product number data stored in the memory 40a of the PLC 4a.
  • step S203 the data of the devices W0 to W99, which are the collected product number data, are stored in the PLC 4a device data storage area 1221a of the predetermined shared memory 1221.
  • step S204 the communication line is set according to the communication procedure with PLC 4a.
  • the user is required to collect the data (the target of the device data) of the data collection destination, the collection storage destination user buffer for storing the collected data, and the shared memory area.
  • the data collection means stored in the memory is activated and the communication protocol with the target PLC for data collection and the setting of line open / close are automatically set.
  • the collected PLC data is once stored in the shared memory, it is stored in the user buffer specified by the user. Therefore, the user only needs to be aware of the contents of the shared memory, which eliminates the need for the user to create a user program corresponding to each communication protocol every time data processing is performed. hardly create programs without the need for improved workability.
  • the data transfer between the shared memory and the user buffer may be considered when storing the data in the user buffer designated by the user.
  • the time required for program processing can be shortened, and the performance of the overnight processing unit (controller) improves.
  • the actual communication with the PLC 4 is left to the device data collection means, and only the shared memory access is performed from a single user program, thus improving the processing performance.
  • Embodiment 2 of the present invention relating to a data setting method will be described with reference to FIGS. 6 to 10.
  • FIG. 1 is a diagrammatic representation of Embodiment 1 of the present invention.
  • FIG. 6 is the c Figure is a block diagram showing the configuration of the data setting apparatus of the present invention, 1 2 3 filed by de Isseki setting means operating in memory 1 2 within 0
  • the same reference numerals as those of the other embodiment 1 indicate the same or corresponding parts.
  • FIG. 7 is a functional diagram showing the function of the data setting means 123.
  • 123 is a shared memory storing device data to be set in the PLCs 4a, 4b, and 4c.
  • 1 232 is a shared memory data setting means as a data transfer means for sending and receiving device data between the shared memory 123 1 and a designated user buffer
  • 1 2 3 3 is a communication protocol of the PLC 4.
  • Device data setting means as device data processing means provided with a communication protocol storage means for storing, where 1 233a is a device A setting means for a PLC 4a connected by a protocol A, for example, an RS 232c protocol. 1233b is the protocol B, for example, the device data setting means of PLC 4b connected by Ethernet protocol, and 1233c is the protocol II, for example, the device data setting of PLC 4c connected by original LAN protocol It is a stage.
  • FIG. 8 is a flowchart showing the operation of the shared memory data setting means 1 2 32.
  • the user program 1 2 1 calls the shared memory data setting means 1 2 3 For 4b and 4c, first, devices W0 to W99, which are the product number data of PLC 4a, and then? User D0 to D49, which is the data on the number of completed production units of the LC 4b, and device R10, which is the measurement data of the PLC 4c. It shows the operation of the program 1 2 1 and the shared memory data setting means 1 2 32.
  • FIG. 9 is a flow chart showing the operation of the device data setting means 1233 for setting data to the PLC 4.
  • the device data setting means 1 233a for protocol A is the PLC 4a.
  • the figure shows the operation for setting the data of the devices W0 to W99, which is the product number for the product.
  • FIG. 10 is a memory configuration diagram showing the contents of the shared memory.
  • the user specifies the device for which the device data is to be set, that is, the target PLC 4 and the user buffer in which the device data for setting the PLC 4 is stored.
  • the shared memory data setting means 1 232 called from the user program 122 by the user stores the device data for setting in the PLC 4 in the shared memory 1221, and the device data setting means 1 233a, Start 1 233 b, 1 233 c.
  • the activated device data setting means 1 233 a, 1 233 b, and 1 233 c actually communicate with the PLCs 4 a, 4 b, and 4 c according to each communication protocol stored inside. And set the device device overnight for the PLCs 4a, 4b, and 4c.
  • the user can set the device data to the specified PLC only by specifying the PLC to set the device data and the user buffer storing the device data to be set. Can be.
  • the operation of the data processing device i.e., the data of device W0 to W99, which is the product number data
  • the data of the devices D0 to D49 which is the production completed number data
  • the operation for setting the data of the devices R10 to 20, which are the measured data to the PLC 4c, will be described in detail with reference to FIGS. 8 and 10.
  • the user can specify the device to be set in the PLC and the device data to be set. Create a user program that specifies the user buffer in which the data is stored and the device data setting area on the shared memory area 123, write it to the memory 120, and end the user's own processing.
  • the device data stored in the user buffer is stored in the PLC 4a
  • the device data stored in the user buffer is stored in the user buffer.
  • Work to set devices D0 to D49 as production completed number data in PLC 4b, device data stored in user buffer, and device R10 to 20 as measured data in PLC 4c This is the task of setting.
  • step S301 the user program written by the user sends to the shared memory data setting means 1222 a device WO to W99, which is the product number data set in the PLC 4a, and the shared memory.
  • step S302 the shared memory data setting means 1 2 3 2 sets the device data setting area 1 2 3 1a to be set in the PLC 4a of the shared memory area 1 2 2 1 in the setting obtained from the user program.
  • the data is stored, and the flow shifts to step S303.
  • the protocol A device data overnight setting means 1 2 3 3a sets the device to be set in the PLC 4a and the setting area 1 2 in the shared memory of the setting data for the PLC 4a.
  • 3 Instruct 1a to activate the device data setting means for protocol A 1 2 3 3a, and to the device data setting area 1 2 3 1a for PLC 4a on the shared memory 1 2 3 1
  • Remembered Device WO-W99 that is, the product number data, is set in the PLC 4a (the operation of the device data setting means for protocol A 1 2 3 3a will be described later). I do.
  • step S301 By the operation from step S301 to step S303, a series of operations for setting the device number data as devices W0 to W99 in PLC 4a is completed.
  • step S304 the user program 1 2 1 sets the shared memory data setting means 1 2 3 in order to set the data of the devices D0 to D49, which are the production completed number data, in the PLC 4b.
  • device D0 to D49 which is the number of completed production units to be set in PLC 4b
  • device data setting area for PLC 4b on shared memory area 1 2 3 1 1 2 3 1b
  • the shared memory data setting means 1 2 3 2 is called.
  • step S305 the shared memory data overnight setting means 1 2 3 2 is obtained from the user program in the device data overnight setting area 1 2 3 1 b to be set in the PLC 4 b of the shared memory area 1 2 3 1. Stores the settings that have been made. Then, in step S306, for the device data setting means for protocol B 1 2 3 3b, the device to be set in the PLC 4b and the setting area 1 2 3 in the shared memory of the setting data for the PLC 4b Instruct 1b to start the device data collection device for protocol B 1 2 3 3b and start the device D 0 to D 4 9 stored in the device data setting area 1 2 3 1 b for PLC 4b. That is, the number of completed products is set in the PLC 4b. Thus, the data setting of the devices D0 to D49, which are the product number data for the PLC 4b, is completed.
  • step S307 to set data of 0,
  • the program 1 2 1 1 is sent to the shared memory data setting means 1 2 32 by the devices R 1 0 to R 20 which are the measured value data to be set in the PLC 4 c and the PLC 4 on the shared memory area 1 2 3 1.
  • the device data setting area for c 1 231 1 c and the user buffer for the setting data are specified, and the shared memory data collection means 1 232 is called.
  • step S308 the shared memory data setting means 1232 stores the setting data obtained from the user program in the device data setting area 1231c to be set in the PLC 4c of the shared memory area 1 2 3 1.
  • the device setting unit 1 233c for the protocol C device data sets the device to be set in the PLC 4c and the setting area 1 in the shared memory of the setting data for the PLC 4c. 23 1c is instructed, and the device data collection means 1 2 33c for protocol C is started, and the devices R-10 to R20 stored in the device data setting area 123 1c for PLC 4c Set the measured value to PLC 4c.
  • the data setting of the devices R10 to R20 which is the measurement value data for the PLC 4c, is completed.
  • FIG. 9 The device data setting means 1 233 a, 1 233 b, and 1233 c are different from each other only in the protocol, and have the same processing procedure. Therefore, the device data setting means for protocol A 1 2 3 The operation is explained using 3a.
  • step S401 the communication line 5a is opened in accordance with the protocol A for communication with the PLC 4a stored therein.
  • step S402 the data of the devices W0 to W99, which are the product number data to be set, are obtained from the device data setting area 1 2 3 1a for the PLC 4a in the shared memory 1 2 3 1. .
  • step S403 communication is performed with the PLC 4a, and the data 41a of the devices W0 to W99, which are product numbers, are set in the memory 40a of the PLC 4a.
  • step S404 the communication line 5a is closed according to the communication procedure with the PLC 4a.
  • the user specifies the PLC (device data target) to which the data is to be set, the user buffer in which the data to be set is stored, and the shared memory area to store the data in the memory.
  • the set data setting means is activated, automatically sets the communication protocol with the target PLC for data setting and the line open / close, temporarily stores the user buffer data to be set in the shared memory, and designates it to the PLC.
  • To the specified memory Therefore, there is no need for the user to create a user program corresponding to each communication protocol each time data is processed, and programs can be easily created without requiring specialized knowledge of communication protocols, improving workability. .
  • FIG. 11 A third embodiment of the present invention relating to a refresh type data collection method will be described with reference to FIGS. 11 to 14.
  • FIG. 11 A third embodiment of the present invention relating to a refresh type data collection method will be described with reference to FIGS. 11 to 14.
  • FIG. 11 A third embodiment of the present invention relating to a refresh type data collection method will be described with reference to FIGS. 11 to 14.
  • FIG. 11 A third embodiment of the present invention relating to a refresh type data collection method will be described with reference to FIGS. 11 to 14.
  • FIG. 11 is a block diagram showing the configuration of the refresh type data collection device of the present invention.
  • reference numeral 124 denotes a refresh type data collecting means which operates in the memory 120, and the same reference numerals as those of the other embodiments 1 and 2 indicate the same or corresponding parts.
  • FIG. 12 is a functional diagram showing the function of the refresh type data collection means 124 operating in the memory 120.
  • 1241 indicates the PLC provided in the memory 120.
  • 4a, 4b, and 4c are shared memories in which the device data stored in memory are stored.
  • 1 2 4 2 is a shared memory provided in memory 1 20 and a specified user buffer.
  • Data collection means as data exchange means for exchanging device data between devices, and 1243 are device data collection refreshes as device data processing means equipped with communication protocol storage means for storing the communication protocol of PLC 4.
  • 1243a is protocol 8, for example, device data collection and refresh means of PLC 4a connected by RS232c protocol
  • 12443b is protocol B, for example, Ethernet protocol.
  • the device data collection / refresh means of b, 1243c is a device data collection / refresh means of a PLC 4c connected by a protocol, for example, a proprietary LAN protocol.
  • Figure 13 is a flow chart showing the operation of the shared memory data overnight collection means 1 2 4 2, where the user program 1 2 1 calls the shared memory data overnight collection means 1 2 4 2 and connects via different communication lines.
  • PLC 4a, 4b From 4, first, devices W0 to W 99, which are the product numbers of PLC 4a, then devices D 0 to D 49, which are the number of completed production of PLC 4b, and then PLC 4c
  • the figure shows the operation of a user program 122 and a shared memory data collection means 1242 for collecting device data in the order of measurement data R10 to R20 while refreshing the device data at the user's storage timing.
  • FIG. 14 is a flowchart showing the operation of the device data collection / refresh means 1 243 for collecting data from the PLC 4.
  • the device data collection / refresh means 1 243 a for protocol A is the PLC 4
  • the figure shows an operation for collecting data of devices WO to W99, which are product number data from a.
  • the user can read the device data to be collected, that is, the PLC that stores the device data, the collection destination user buffer that stores the collected device data, and the shared memory area 124 1 Specify the device data storage area and storage timing for data refresh.
  • the CPU 110 instructs the device data collection / refresh means 1 243 a, 1 243 b, and 1 243 c to the PLC designated by the user and starts up. Let it.
  • the device data collection and refresh means 1 243a, 1 243b, and 1 243c actually communicate with the PLCs 4a, 4b, and 4c in accordance with the communication protocols stored internally, in accordance with the storage timing.
  • Device data is collected from 4 b and 4 c and stored in the device storage area of the shared memory 1241.
  • the shared memory data collection means 1242 is composed of the PLC 4a, which the device data collection collection refresh means 1243a, 1243b, and 1243c collect and store in the shared memory 1221, in accordance with the storage timing. 4b and 4c are stored in the user buffer specified by the user.
  • the user only needs to specify the PLC from which device data is to be collected, the collection and storage destination user buffer to be stored, and the device data storage area and the storage timing for data refresh. It can be collected while refreshing the device.
  • the operation of the data processing device that is, the product number data from the PLC 4a, the data of the devices WO to W99, and the data of the devices D0 to D49, which are the number of completed production units, from the PLC 4b,
  • the operation for collecting the data of the devices R 10 to 20 as the measurement data from 4 C will be described in detail with reference to FIGS. 13 and 5.
  • the user specifies the PLC in which the device data to be collected is stored, and also specifies the collection and storage destination user buffer for storing the collected device data, the device data storage area, and the storage timing for data refresh.
  • the user program is created and written into the memory 120, and the user's own processing ends.
  • the work of collecting the data of the devices W0 to W99, which are the product number data, from the PLC 4a and storing the data in the user buffer of the collection storage destination, and the device of which the number of the completed production from the PLC 4b is Work to collect the data from D0 to D49 and store it in the user buffer for collection and storage; From PLC 4c.
  • step S501 the user program written by the user sends to the shared memory data collection means 1222 a device WO-W99, which is product number data to be collected from the PLC 4a.
  • the storage timing is specified for the shared memory area for temporary storage 1 2 4 1 on the device data storage area for PLC 4 a 1 2 4 1 a, and the collection and storage destination user buffers to be finally stored. Call the shared memory data collection means 1 2 4 2 and go to step S502.
  • step S502 the shared memory data collection means 1 242 actually communicates with the PLC 4a from among the communication protocols stored in advance corresponding to the PLC connected to the controller 100.
  • the communication protocol that performs the communication i.e., device data collection for protocol A, and the refresh means 1 2 4 3a are selected, and the device data collection method for protocol A, refresh method 1 2 4 3a, is collected from the PLC 4a.
  • step S Move to 503.
  • step S503 the product number data stored by the protocol A device data collection and refresh means 1 243a is stored from the PLC 4a device data storage area 1 241a inside the shared memory 1241.
  • the device of the evening WO-W99 is stored in the user buffer specified by the user by the user program.
  • step S501 to step S503 the data of the devices WO to W99, which is the product number data from the PLC 4a, is stored in the user storage buffer specified by the user 1 A series of work ends.
  • step S504 in order to collect data of the devices D0 to D49, which are data of the number of completed production units, from the PLC 4b, in step S504, the user program
  • devices D0 to D49 which are the data on the number of completed production units to be collected from the PLC 4b, and the device data storage area 1 24 1b for the PLC 4 b on the shared memory area 1 24 1 and the collection destination user
  • the buffer and storage timing are instructed, and the shared memory data collection means 1 242 is called.
  • step S505 the shared memory data collection means 1 242 sets the device data storage area 1 24 1 b to be collected from the PLC 4b in contrast to the protocol B device data collection fresh means 1 243b. And the storage area of the PLC 4b device data on the shared memory 1 2 4 1b and the storage timing are specified, and the device data collection and refresh means 1 243b for protocol B is started.
  • step S506 the user program 1221 stores the protocol B device data collection and refresh means 1243b from the PLC 4b device data storage area 1241b of the shared memory 1241. Then, the user program 122 collects the data of the devices D0 to D49, which are the product number data, using the shared memory data collection means 1242 in the storage user buffer.
  • step S 507 the user program 12 1 sends the PLC 4 c Device R10 to 20, which is the measurement data to be collected from the PLC, and the device data storage area for the PLC4C on the shared memory area 1241, and the user buffer for the collection and storage destination In addition, the storage timing is instructed, and the shared memory data collection means 1 242 is called.
  • step S508 the shared memory data collection means 1 242 is compared with the device data collection and refresh means 1 243c for protocol C. Instruct the storage area 124 1c and the storage timing on the data shared memory, and start the device C overnight collection refresh procedure 15c for protocol C.
  • step S509 the user program 12 21 stores the protocol C device data collection / refresh means 1 243 c from the PLC 4 c device data storage area 124 1 c of the shared memory 1241,
  • the user program 122 collects the data of the devices R10 to R20, which are the measured value data, into the collection destination user buffer using the shared memory data collection unit 1242.
  • step S510 again select whether to collect the device data of PLCs 4a, 4b, and 4c. If continuous operation is to be performed, the shared memory 1 is selected in step S511. 24 Collect device data from 1 to PLC 4a.
  • step S511 If not, the process returns to step S511 and performs the device data collection process again.
  • the device data collection means 1 243 a, 1 243 b, and 1 243 c are different from each other only in the protocol, and have the same processing procedure. Therefore, the device data collection and refresh means for protocol A 1 243 3 The operation will be described using a.
  • the shared memory data collecting means 1242 In order to collect the data of the devices WO to W99, which are the product number data, from the PLC 4a by the shared memory data collecting means 1242, a data collection instruction of the devices WO to W99, which is the product number data, is received. Then, the device refreshing means 1243a is activated.
  • step S601 the communication line 5a is opened according to the protocol A for communication with the PLC 4a stored therein.
  • step S602 the device communicates with the PLC 4a and collects data 41a of devices W0 to W99, which are product number data stored in the memory 40a of the PLC 4a. .
  • step S603 the data of the devices WO to W99, which are the collected product number data, are stored in the predetermined shared memory 1221, device data for the PLC 4a. Store in area 1 2 4 1 a. (See Fig. 5)
  • step S604 the process waits until the storage timing specified by the user comes.
  • step S 605 if there is an end request from the user 1 program 1 2 1 through the shared memory data collection means 1 2 4 2, communication is performed according to the communication procedure with the PLC 4 a in step S 6 06. Close line 5a. If there is no end request, the process is repeated from step S602 again.
  • the shared memory area refreshed at the timing designated by the user without accessing the PLC connected by each protocol every time.
  • the latest device data can always be collected.
  • Embodiment 4 of the present invention relating to a refresh type data setting method will be described with reference to FIGS. 15 to 18.
  • FIG. 15 Embodiment 4 of the present invention relating to a refresh type data setting method
  • FIG. 15 is a block diagram showing the configuration of the refresh type data setting device of the present invention.
  • reference numeral 125 denotes a refresh type data setting means which operates in the memory 120, and the same reference numerals as those in the other embodiments 1 and 2 indicate the same or corresponding parts.
  • FIG. 16 shows a refresh type data memory operating in the memory 120 of FIG. —Function diagram showing the function of the evening setting means 1 25, where 1 25 1 is the device data stored in the PLCs 4a, 4b; 4c provided in the memory 120.
  • the stored shared memory, 1 2 52 is a shared memory data setting means as a data transfer means for transferring device data between the shared memory provided in the memory 1 20 and a designated user buffer
  • 1 253 is a device data setting refresh device as a device data processing device having a communication protocol storage device for storing the communication protocol of the PLC 4, and 1 253a is connected by a protocol 8, for example, an RS 232c protocol.
  • PLC 4a device data setting refresh means 1253b is protocol B, for example, PLC 4b device data overnight setting refresh means connected by Ethernet protocol, and 1253c is professional Col ⁇ a device data set Rifuretsushu means connected PLC 4 c for example a proprietary LAN protocol.
  • FIG. 17 is a flowchart showing the operation of the shared memory data setting means 1252.
  • the user program 1 2 1 calls the shared memory data setting method 1 2 52, and the PLCs 4a, From 4b and 4th, first, the devices W0 to W99 which are the product number data of the PLC 4a, the devices D0 to D49 which are the data of the number of completed production of the PLC 4b, and then the PLC 4c
  • the operation of the user program 12 1 and the shared memory data collection means 1 252 for setting the device data while refreshing it at the user-specified storage timing in the order of the device R 10 to 20 which is the measured value data is shown. .
  • FIG. 18 is a flowchart showing an operation for setting data to the device data setting refresh means 1 253 PLC 4.
  • the device data setting refresh means 1 253 a for protocol A stores the product number data in the PLC 4 a. Is a device WO-W 99 The operation for the operation is shown.
  • the user can set the device data to be set, that is, the target PLC 4, the user buffer that stores the device data to be set in the PLC 4, and the device data setting on the shared memory 1251 Specify the storage timing for refreshing the data setting from the area and device data setting area 1251a, 1251b, and 1251c.
  • 1252 stores the device data to be set in the PLC 4 in the shared memory 1251, and activates the device data setting refresh means 1253a, 1253b, and 1253c.
  • the activated device data setting refresh means 1 253 a, 1 253 b, and 1 253 c acquire the device data from the shared memory 122 1 in accordance with the storage timing and store it internally. Actually communicates with the PLCs 4a, 4b, and 4c according to each communication protocol.
  • the user can specify the PLC to set the device data and the user buffer in which the device data to be set is stored, and specify the device data setting area and storage timing only by specifying the specified PLC. It can be set while refreshing the device data.
  • the user specifies the device to be set in the PLC, the user buffer storing the device data to be set, the device data setting area for PLC 4a in the shared memory area 1251, and the storage timing.
  • the user program to be designated is created and written to the memory 120, and the processing of the user itself ends.
  • the device data stored in the user buffer is
  • step S701 the user program written by the user 1 is sent to the shared memory data setting means 1 2 52 by the device W0 to W, which is the product number data to be set in the PLC 4a.
  • step S702 Temporary shared memory area 1 2 5 1 Device data setting area for PLC 4a on 1 25 1 Instruct user buffer for setting data and set storage data, and set shared memory data
  • step S702 the user program written by the user 1 is sent to the shared memory data setting means 1 2 52 by the device W0 to W, which is the product number data to be set in the PLC 4a.
  • 9 Temporary shared memory area 1 2 5 1 Device data setting area for PLC 4a on 1 25 1 Instruct user buffer for setting data and set storage data, and set shared memory data
  • the means 1 2 5 2 is called, and the process proceeds to step S702.
  • step S702 the shared memory data setting means 1 2 5 2 Based on the user program, store the device data to be set in PLC 4a in the device data setting area 12501a for PLC 4a on the shared memory 1251 in the user buffer and go to step S703. Transition.
  • step S703 the shared memory data setting means 1 252 sends the device data setting refresh means 1 253a for the protocol A to the device to be set in the PLC 4a and the setting data setting for the PLC 4a.
  • steps S701 to S703 a series of operations for setting the device WO-W99, which is the product number, in the PLC 4a is completed.
  • step S704 the user program 1 2 1 sends the data to the shared memory data setting means 1 252.
  • step S705 the shared memory data setting means 1 52 stores the setting data obtained from the user program in the device data setting area 1 2 5 1 b to be set in the PLC 4 b of the shared memory area 1 2 5 1. I do.
  • step S706 device data setting for protocol B For the refresh means 1 253 b, the device to be set to the PLC 4 b and the setting area 1 2 5 1 b on the shared memory of the setting data for the PLC 4 b are indicated, and the device data collection and refresh means for protocol B Activate 1 2 53 b and set the devices D 0 to D 49 stored in the device data setting area 1 2 5 1 b for PLC 4 b, that is, the number of completed products, in the PLC 4 b.
  • the user program 1211 sends the shared memory data setting means 1
  • the device R10 to R20 which is the measured value data to be set in the PLC 4c
  • the PLC 4c device data on the shared memory area 1251, the setting area 1251c, and the setting data Instruct the user's buffer and storage timing in the evening, and call the shared memory data collection means 1252.
  • step S708 the shared memory data setting means 1252 stores the setting data obtained from the user program in the device data setting area 1251c to be set in the PLC4C of the shared memory area 1251. I do.
  • step S 709 the device data to be set in the PLC 4 c and the setting area 1 in the shared memory of the device to be set in the PLC 4 c and the setting data 1 2 5 1c is instructed, and the device data collection and refresh means for protocol C 1 2 53 c is activated, and the devices R 10 to R 20 stored in the device data setting area 125 1 c for PLC 4 c, that is, the measured values Set the data to PLC 4c.
  • the devices R10 to R2 which are the measurement value data for the PLC 4c
  • the default setting of 0 ends.
  • step S710 again select whether to set the device data in PLCs 4a, 4b, and 4c. If continuous operation is to be performed, the shared memory 1 is set in step S711. 2 5 From 1 to 1, refresh the device at PLC4a at the preset timing.
  • step S714 the device data setting refresh means is stopped in steps S716, S717, and S718.
  • step S711 If not, the process returns to step S711 and performs the device data setting process again.
  • the device data setting refresh means 1 2 53 a and 1 2 53 b 1 2 53 c are different from each other only in the protocol and the processing procedure is the same, the device A setting refresh means 1 25 3 a for protocol A is used. The operation will be described with reference to FIG.
  • the data of the devices W0 to W99, which are the product numbers are set in the PLC 4a in order to set the data of the devices W0 to W99, which are the product numbers.
  • the device data setting refresh means 16a is activated.
  • step S801 the communication line 5a is opened according to the protocol A for communication with the PLC 4a stored therein.
  • step S802 the data which is the product number data to be set is set.
  • the data of the devices WO to W99 is acquired from the device memory setting area 1 2 5 1 a for the PLC 4 a of the shared memory 125 1.
  • step S803 communication is performed with the PLC 4a, and the data 40a of the product numbers W0 to W99 are set in the memory 40a of the PLC 4a.
  • step S804 the process waits until the storage timing designated by the user comes.
  • step S805 If there is an end request from the user program 40d in step S805 through the shared memory data setting means 1 2 52, the process proceeds to step S806, and the communication line 5a is closed according to the communication procedure with the PLC a4. Read.
  • step S802 the refresh setting is repeated from step S802.
  • the program processing of the shared memory data setting means has a simple configuration even when setting to the PL specified by the user, and the time required for the program processing can be shortened. Performance is improved.
  • the shared memory area that is refreshed at the timing specified by the user without accessing the PLC connected with each protocol every time 1 2 5 1 a, 1 2 5 1 b, 1 2 5 1 By reading c, the latest device data can always be set.
  • Example 5 In addition, the overhead of communication time is reduced, and the performance is further improved. Example 5.
  • FIGS. 19 to 22 An embodiment of the present invention relating to a data collection method will be described with reference to FIGS. 19 to 22.
  • FIG. 19 is a block diagram showing the configuration of the data collection device of the present invention.
  • 6 is an auxiliary storage device for storing a setting data file 6 1 (see FIG. 22)
  • 1 26 is a data collection means operating in the memory 120
  • 15 1 is an auxiliary storage device 6
  • the same reference numerals as those of the other embodiments indicate the same or corresponding parts.
  • FIG. 20 is a functional diagram showing the functions of the data collection means 126 operating in the memory 120.
  • reference numeral 125 denotes a PLC 4a provided in the memory 120.
  • 4b, 4c a shared memory in which the device data held is stored.
  • a shared memory data collection means as a means for sending and receiving data
  • a device data collection means as a device data processing means provided with a communication protocol storage means for storing a communication protocol of the PLC 4.
  • 1 2 6 3 a is a protocol 8, for example a PLC 4 a connected with the RS 2 3 2 c protocol Device data collection means
  • 1 2 4 3b is protocol B, e.g. PLC 4b connected by Ethernet protocol Device data collection means
  • 1 2 3 4c is protocol, e.g. connected by proprietary LAN protocol This is the device data collection means of the PLC 4c.
  • FIG. 21 shows the device data collection means for protocol A 1 2 6 3a, the device data collection means for protocol B 1 2 6 3b, and the device data collection means for protocol C 1 2 6 3c.
  • FIG. 22 is a flowchart showing the operation, and FIG. 22 is a database format file in the auxiliary storage device 6 for storing data in which an interval for collecting PLC device data is set (hereinafter, referred to as FIG. 2 is a diagram showing a setting data file).
  • the user inputs “PLC device data collection protocol name” and “PLC device data collection interval” from keypad 3 and stores this data in the setting data file 6 1 in the auxiliary storage device 6 (see Fig. 22). Save to Next, the device data collection means for protocol A 1 2 6 3 a, the device data collection means for protocol B 1 2 6 3 b, and the device data collection means for protocol C 1 2 6 3 c Referring to the setting data file 6 1 in 6, the PLC device data stored in the PLC 4 is stored in the shared memory 1 2 6 1.
  • the user sets the collection of the device data from the PLC in the form of a database format setting data in the auxiliary storage device instead of the setting by the user program.
  • the device data collection means for various protocols can store the PLC device data in the shared memory at set intervals.
  • the shared memory data collection means 1 262 uses the protocol A device developed on the memory 120 and the data collection means 1 263 a, the protocol B device.
  • the data collection means 1 2 6 3 b and the protocol C device data collection means 1 2 6 3 c are activated, in step S 901, the setting data file 6 in the auxiliary storage device 6 is read. Read the PLC device data collection interval corresponding to the protocol by referring to the PLC device data collection protocol name in 1.
  • step S902 the process waits for the PLC device data collection interval set by the user for one night, shifts to step S903, and stores the PLC device data from the PLC 4 in the shared memory 12 according to each protocol. Stored in 2 1 and return to step S902.
  • the collection interval is set as a parameter for each collection protocol. Even when changing the interval, the device data collection settings can be easily changed by changing only the parameters set as parameters without changing the entire user program, improving programming workability. I do. Embodiment 6.
  • FIGS. 23 to 29 An embodiment of the present invention relating to a data collection method will be described with reference to FIGS. 23 to 29.
  • FIG. 23 is a system configuration diagram showing the system configuration of the data collection device of the present invention.
  • 100, 100, and 102 are the same or equivalent controllers. Yes, it has both shared memory and refresh type data collection means. -Also, the controllers 100, 101, and 102 are connected by the same protocol E, for example, the Ethernet protocol, by the communication line 5e, which is the second communication line.
  • E for example, the Ethernet protocol
  • the controller 100 has a PLC 4a via a communication line 5a which is a first communication line, and the controller 101 has a PLC 5a via a communication line 5d which is a first communication line.
  • d is connected to the controller 102 via a communication line 4 f which is a first communication line, and a PLC 4 f is connected to the controller 102 by different protocols.
  • FIG. 24 is a functional diagram showing the function of data collection means operating in the memory.
  • reference numeral 121 denotes a user program that accesses the shared memory 1271 by a unified communication procedure
  • Reference numeral 127 denotes a refresh type data collection means operating in the memory 120
  • reference numeral 142 denotes an IZF for the protocol E.
  • the controllers 101, 100 are provided by the same communication protocol via the communication line 5e. 2 and connected.
  • 127 1 is transmitted by the device data and controller 101 held by the PLC 4a, and received and stored by the controller 100.
  • 1 2 7 2 is a shared memory data collection means as a data exchange means for exchanging device data between the shared memory 1 2 7 1 provided in the memory 1 20 and a designated user buffer
  • 1 2 73a is a device provided with communication protocol storage means for storing the communication protocol of the PLC 4a connected by the protocol A, for example, the RS232c protocol.
  • Device data collection and refresh means as speed-up processing means.
  • the writing means that sends the write request from the other controller 101 and 102, and the writing means that writes to the shared memory 1271, and the device refresh parameter 127 This is a constant interval activation means for activating the write request transmission means 1 274 at regular intervals in accordance with the device refresh parameters stored in the evening storage area 127 1 d.
  • FIG. 25 is a diagram showing the contents of the device refresh parameters set on the shared memory by the user 1.
  • reference numeral 20 denotes the main body of the device refresh parameters, and The data is written to the shared memory 1271 by the communication procedure unified by the user program at 0, 101, and 102, respectively.
  • 2 1 is the interval for refreshing device data on each shared memory between controllers 100, 101, and 102.22 is the interval from controller 100 to other controllers. This is the range of device data to be transferred to 101 and 102.For example, the data of W0 to W99 and D0 to D99 are transferred to other controllers 101 and 102, respectively. It is set to transfer.
  • 23 is the range of device data to be transferred from the controller 101 to the other controllers 100 and 102, for example, W200 to W299 and D100 to D199 Are set to be transferred to the controllers 100 and 102, respectively.
  • 24 is a range of device data to be transferred from the controller 102 to the other controllers 100, 101, for example, the data of 0200 to 13299 and the data of 10 to R99 are transferred to the other controllers 100, 10 1 It is set to transfer to each.
  • FIG. 26 is a diagram showing an example of the contents of a device write request transmission data to be transferred to another controller.
  • the device write request transmission data is one of the refresh parameters. Number of settings assigned to one controller 25, Device type 26 described in Refresh parameter setting 1, Device start number 27 described in Refresh parameter setting 1, Refresh parameter setting 1 It consists of 28 transfer bytes of the device described in the setting 1 of the setting, and device data 29 to be transferred described in the setting 1 of the refresh parameter.
  • FIG. 27 is a flowchart showing the operation of the means for activating the means for transmitting a write request to another controller in the own controller device at regular intervals in accordance with the refresh parameter.
  • FIG. 28 is a flow chart showing the operation of the means for transmitting a write request to another controller in the own controller device data at regular intervals according to the refresh parameter.
  • FIG. 29 is a flowchart showing an operation of a means for receiving a write request from another controller and writing the same in the shared memory.
  • the fixed interval starting means for starting the means for requesting the writing of the own controller device data to another controller at fixed intervals is started by the device on the shared memory.
  • the constant interval starting means 127 6 starts the own controller device data writing request sending means 122 7 4 to another controller in accordance with the refresh interval 21 in the refresh parameter 20.
  • the write request transmitting means 1274 reads the refresh parameter 20 from the device refresh parameter storage area 1271d on the shared memory 1271.
  • the device range 22 for issuing a write request to another controller of the own controller the device data on the shared memory 127 1 is read, and the device data is written to the other controllers 101 and 102. Sends a request to another controller via protocol IZF142 for request.
  • the writing means 1 27 5 starts and writes the received data to the shared memory 1 27 1.
  • step S 1002 the device refresh parameter storage area 1 2 7 1 d on the shared memory 1-27 1 is searched for the refresh parameter storage 20, and the controller 100 is used for its own controller 100.
  • step S1003 based on the setting data 22 for the own controller 100, the setting number 25, device type 26, device head No 27, and transfer byte number 28 are extracted. In accordance with the format shown in FIG. 26, data for sending a write request to another controller is created.
  • step S104 a write request transmission data to another controller is instructed, and the write request transmission means 1274 is activated.
  • step S1005 until the next time the write request transmission means 1274 is activated, the processing of the own routine is performed for the time of the device refresh interval 21 read from the refresh parameter. And wait for execution.
  • step S 10 01 Since the device refresh parameter storage area 1 2 7 1 d on the shared memory 1 2 7 1 d may be changed by the user program 12 1, the processing in step S 10 01 again is performed. Execute repeatedly from.
  • the means for transmitting a write request to the other controller in the own controller device server is started periodically at a user-specified refresh interval.
  • step S111 instructed by the fixed interval starting means 1 276
  • the device data is read from the shared memory 1 2 7 1 and the device data 2 9 of the write request transmission data to the other controller is set. Complete the transmission data.
  • step S1102 the refresh parameter 20 of the device refresh parameter storage area 1271d on the shared memory 1271 is searched, and the other controllers 101, 10 are searched. Read the controller numbers 2 3 and 24 in 2 and determine to which controller the transmission data is to be transmitted.
  • step S113 a communication line 5e of the protocol E, which is the same protocol, is opened between the controllers in order to transfer the created transmission data to another controller.
  • step S1104 the completed write request transmission data is transmitted to the controller numbers 23 and 24 of the other controllers 101 and 102.
  • step S1105 the communication line 5e of the protocol E which is the same protocol between the controllers is closed.
  • step S 1 201 device data write request reception data from another controller is searched, and the set number 27 is extracted.
  • step S122 the device data overnight write request reception data from the other controller is searched, and from the device type 26, the device start No. 27, the shared memory 12 of the own controller 100 is searched. 7 Determine the write destination of the device on 1 and write the device data 29 in the received data to the determined device on the shared memory 127 1 for the number of transfer bytes.
  • step S123 it is determined whether or not the set number of device data has been written to the shared memory 1271, and if all of the set number have been written, the processing is completed. If all data has not been written, the process returns to step S122 and performs the above-described processing.
  • FIG. 30 An embodiment of the present invention relating to a method for setting refresh parameter overnight data will be described with reference to FIGS. 30 to 33.
  • FIG. 30 An embodiment of the present invention relating to a method for setting refresh parameter overnight data will be described with reference to FIGS. 30 to 33.
  • FIG. 30 is a functional diagram showing the function of the refresh parameter overnight setting means operating in the memory of the present invention.
  • reference numeral 121 denotes unified shared memory 1281. It is a user program accessed by communication means, and has a user program 1 2 1 1 for setting device refresh parameters on a shared memory.
  • 1 28 is the data collection means operating in the memory 120
  • 128 1 is the data collection device stored in the PLC 4 provided in the data collection means 128.
  • 1 2 8 1 e is a storage area where device refresh parameters set in the shared memory are stored
  • 1 2 8 2 is a user specified as shared memory.
  • Shared memory data collection means as a means for sending and receiving device data to and from one buffer, and 1 283 is stored in the device refresh parameter storage area 1 281 e.
  • Device refresh parameter data transfer means (hereinafter, transfer means) for transferring the device refresh parameter data to another controller 101, 102 via the second communication line.
  • FIG. 31 is a flowchart showing the operation of the transfer means 1283
  • FIG. 32 is a flowchart showing the operation of the writing means 1284
  • FIG. 33 is a flowchart showing the device refresh operation.
  • 5 is a flowchart showing the operation of a user program set on a shared memory.
  • the device refresh parameters stored in the shared memory 1 2 8 1 e Device refresh parameters are set in the e-data, and the device refresh parameters are set to the other controller. Start the transfer method 1 2 8 3 to transfer.
  • the transfer means 1 283 3 reads the device refresh parameter data from the device refresh parameter storage area 1 281 e on the shared memory, and stores the communication protocol stored in advance in the transfer means 1 283. Is transferred to another controller based on.
  • the writing means 1 284 4 determines whether the received data is device data or device refresh parameter data when the data received from another controller is received. Write to the device data storage area of the shared memory of the own controller in the local controller, and write it to the device refresh area of the device in the controller's shared memory in the case of the device refresh parameter data. .
  • Device refresh parameter overnight data is set from the buffer to the device refresh parameter overnight storage area 1 2 8 1 e.
  • step S1301 the device refresh parameter storage area stored in the refresh parameter storage area 1281e is read.
  • step S1302 the communication protocol stored inside is read out, the communication line is opened according to the communication protocol, and the device refresh parameter is connected to another device connected by the same protocol. Transfer to controller.
  • the transfer means As described above, by providing the transfer means, the user buffer storing the device refresh parameter data by the user program and the device refresh parameter storage area 1 on the shared memory 1 By specifying 281 e, the device refresh data set in the controller 100 can be set in the other controllers 101 and 102 in the same manner.
  • step S1401 a data transmission to the own controller is received from another controller connected by the same protocol.
  • step S1402 it is determined whether the received data is device data overnight or device refreshing data overnight.
  • step S1402 if the data is device refresh parameter overnight data, the flow shifts to step S1403 to receive the device refresh parameter overnight storage area 1 281 e on the shared memory of the controller. Set the received data.
  • step S144 sets the device data storage area in the shared memory 1281 of the controller.
  • the received data can be written without depending on the user program.
  • step S1501 a device refresh parameter storage to be stored in the refresh parameter storage area 1281e is created.
  • step S1502 the refresh parameter setting area is set to the refresh parameter setting area 1 2 8 1 e, and the transfer Activate steps 1 2 8 3.
  • the creation of the device refresh parameter data may be created as a user program, or the user buffer in which the device refresh parameter data is stored may be specified by the user program.
  • the data processing apparatus includes: a communication protocol storage unit that previously stores a communication protocol with a control target device connected via a communication line for each of the control target devices; According to the communication protocol stored in the protocol storage means, device data held by the controlled device is collected or device data processing means for setting device data in the controlled device; and A shared memory area for storing device data or device data to be set in the device to be controlled, and data transfer means for transferring the device data between the shared memory area and a designated user buffer. So that the user only needs to be aware of the contents of the shared memory. Collection of device data with multiple PLCs with different communication protocols can be performed in a unified procedure without having to be aware of the communication protocol. The Z setting can be performed, eliminating the need to create a complicated user program. Can be reduced. In addition, the communication with the PLC of the controller is delegated to the collection means, and since only one user program accesses the shared memory, the processing capacity is improved.
  • the device data overnight processing means has a refresh control function of collecting device data held by the controlled device or setting device data to the controlled device at a predetermined timing.
  • the latest device data can be easily collected and set.
  • the device data processing means reads a predetermined timing for performing the refresh control from the setting data file in which the data is set as the parameter, the refresh timing can be set as the parameter.
  • the data exchange means exchanges all data between the shared memory area and the designated user buffer using communication means set in advance, the user can specify the user buffer and the shared memory area. Only, and the workability of creating a user program is improved.
  • the data transfer means exchanges device data between the shared memory area and the user buffer every time the value of the device data is changed.
  • the shared memory area is divided into blocks for each device data of the control target device and stored, so that data handling becomes easy.
  • the data processing method includes a step of reading a communication protocol with a control target device connected via a communication line from a communication protocol storage means stored in advance for each of the control target devices. Collecting the device data held by the controlled device via the communication line or setting the device data to the controlled device via the communication line according to the read communication protocol; Storing in the shared memory area the device data collected from the device or the device data to be set in the controlled device; and transmitting and receiving the device data between the shared memory area and the designated user buffer.
  • the user only needs to be aware of the contents of the shared memory, and is not aware of different communication protocols, Device data collection with multiple PLCs with different communication protocols can be performed through complicated procedures.
  • the process of storing the device data collected from the control target device or the device data set for the control target device in the shared memory area is executed at a predetermined timing set in advance, the latest device data is stored. easily collect evenings Z can be set.
  • Device data processing means for collecting device data held by the control target device or setting device data to the control target device in accordance with a communication protocol on the first communication line; and A device for transmitting and receiving the device data between the shared memory area for storing the device data collected by the device or the device data to be set in the control target device, and the designated user buffer.
  • the device data stored in the shared memory area is stored via the second communication line.
  • the user is conscious of the contents of the shared memory because the transmission means for transmitting and the writing means for storing the device data transmitted via the second communication line in the shared memory area are provided. Only need to be aware of different communication protocols. Collection of device data with multiple PLCs and controllers that have multiple controllers Z can be set, eliminating the need to create complex user programs and reducing the load of a single user program.
  • the communication with the controller is delegated to the collection means, and since only one user program accesses the shared memory, the processing capacity is improved.
  • the first communication protocol storage means for storing in advance the first communication protocol with the control target device connected via the first communication line for each control target device is provided, It is not necessary to set the communication protocol by one program, and it is possible to prevent the program from being enlarged.
  • the device data processing means has a refresh control function of collecting device data held by the controlled device or setting device data to the controlled device sequentially at a predetermined timing.
  • the latest device data can be easily collected and set between the clients.
  • the transmitting means transmits the device data via the second communication line at a predetermined timing based on the parameters stored in the shared memory area. This makes it possible to improve the processing capacity and change the set value by processing based on the parameters.
  • the transmitting means operates at a constant interval from the starting means operating based on a predetermined parameter, so that the transmitting means always operates at a constant timing, improving the reliability of data, and improving the timing of the user program. There is no need to set by the ram, and the program can be prevented from becoming too large.
  • the writing means stores the data in blocks for each device. Becomes easier.
  • the second communication line uses the Ethernet protocol, the degree of freedom of the system is increased. -Also, since the parameters stored in the shared memory are transmitted via the second communication line, the same parameters can be easily transmitted between controllers connected via the second communication line. The work efficiency of parameter setting, which has been set by reconnecting peripheral devices in the past, is improved.
  • the data transmitted via the second communication line is a parameter or device data overnight. If the data is a parameter overnight, the data is stored in the parameter storage area on the shared memory. The data is stored, and if it is device data, it is stored in the storage area for each device to be controlled, so the transmitted data can be arbitrarily classified and stored without setting by the user program, The load can be reduced.
  • the data processing device, the data processing method, and the data processing system according to the present invention are suitable for being used in data collection Z setting between a PLC and a controller connected by a predetermined communication protocol. .

Landscapes

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

Abstract

The communication protocol for each of the PLCs connected via communication channels is stored beforehand to eliminate the need for the user program to set the communication protocol. In collecting device data, the data processor is connected to a PLC according to the communication protocol, collects the device data, stores the collected device data in a shared memory, and transfers the device data from the shared memory to a specified user buffer. In setting the device data, the processor receives device data from a specified user buffer, stores it in the shared memory, is connected to a PLC according to the communication protocol stored beforehand, and sets the device data for the PLC.

Description

明 細 書 データ処理装置及び処理方法並びにデータ処理 技術分野  Description Data processing apparatus, processing method and data processing technical field
この発明は、 通信回線を介して制御対象機器とのデ一夕を収集 Z設定 するデータ処理装置及び処理方法並びにデータ処理システムに関するも のである。 背景技術  The present invention relates to a data processing device, a processing method, and a data processing system for collecting and setting data with a device to be controlled via a communication line. Background art
第 34図は、 従来のデ一夕処理装置の構成を示すブロック構^図であ り、 図において、 200は入出力装置である CRT 2及びキーボード 3、 並びにそれぞれ異なる通信プロトコルに基づく通信回線 5により接続さ れた複数台の PL C (Programmable Logic Controller) 4を制御するコ ン卜ローラである。  FIG. 34 is a block diagram showing the configuration of a conventional data processing apparatus. In the figure, reference numeral 200 denotes an input / output device such as a CRT 2 and a keyboard 3, and a communication line 5 based on different communication protocols. This is a controller that controls a plurality of PLCs (Programmable Logic Controllers) 4 connected by a PC.
なお、 通信回線も各 P LC 4 (PL C 4 a、 4 b、 4 c) に対応して 3 つ (通信回線 5 a、 5 b、 5 c) として説明する。 The communication lines are described as three (communication lines 5a, 5b, 5c) corresponding to each PLC 4 (PLCs 4a, 4b, 4c).
ここで、 コントローラ 200は、 メモリ 2 20内に展開された P L C デバイスデ一夕収集/設定プログラム等のユーザープログラム 22 1を 実行する C PU2 1 0、 C RT 2とのイン夕一フェース 23 1、 キーポ —ド 3とのインターフェース 232、 異なる通信プロトコルにより接続 される P L C 4 a、 4 b、 4 cとのインターフェース 24 1、 242、 243から構成されている。  Here, the controller 200 executes a user program 221 such as a PLC device data collection / setting program developed in the memory 220, the CPU 210 and the interface 210 with the CRT 2 231, It consists of an interface 232 with the keypad 3 and interfaces 24 1, 242 and 243 with the PLCs 4a, 4b and 4c connected by different communication protocols.
第 3 5図は、 PLC 4 a、 4 b、 4 cのメモリ状態図であり、 図にお いて、 40は PLC 4のメモリ、 41はメモリ上に保存されているデバ イスデータである。 なお、 各 P L C 4 a、 4 b、 4 cそれぞれにメモリ 40 a、 40 b、 4 0 cが設けられており、 そのメモリ 40 a、 4 0 b、 40 c上には、 デ バイスデ一夕 4 1 a、 4 1 , 4 1 cが保存されている。 FIG. 35 is a memory state diagram of the PLCs 4a, 4b, and 4c. In the figure, reference numeral 40 denotes a memory of the PLC 4, and 41 denotes device data stored in the memory. Each of the PLCs 4a, 4b, and 4c has a memory 40a, 40b, and 40c, respectively. 1a, 41, and 41c are stored.
第 3 6図は、 従来の異なる通信回線で接続された P L C 4からデータ を収集するためのフロ一チャートであり、 P L C 4 aのメモリ 40 aか らデバイス領域 4 1 aの製品番号データであるデバイス W0〜W 9 9、 次に P L C 4 bのメモリ 40 bからデバイス領域 4 1 bの生産完了台数 データであるデバイス D 0〜D 49、 次に P L C 4 cのメモリ 40 cか らデバイス領域 4 1 cの計測値デ一夕であるデバイス R 1 0〜2 0の順 にデータ収集を行う場合のユーザ一プログラム 2 2 1の動作を示してい る。  FIG. 36 is a flow chart for collecting data from the PLC 4 connected by the conventional different communication line, and shows the product number data of the device area 41 a from the memory 40 a of the PLC 4 a. Devices W0 to W99, then from PLC 40b memory 40b to device area 4 1b Production completed number data for devices 1D to D49, then PLC 4c memory 40c to device area 4 It shows the operation of the user program 221 when data is collected in the order of devices R10 to R20, which are the measured values of 1c.
第 3 7図は、 従来の異なる通信回線で接続された P L C 4に対してデ 一夕を設定するためのフローチヤ一トであり、 P L C 4 aのメモリ 40 aのデバイス領域 4 1 aにおける製品番号デ一夕であるデバイス W0〜 W99、 次に P L C 4 bのメモリ 40 bのデバイス領域 4 1 における 生産完了台数データであるデバイス D 0〜D 49、 次に P L C 4 cのメ モリ 40 cのデバイス領域 4 1 cにおける計測値データであるデバイス R 1 0〜2 0の順にデータ設定を行う場合のユーザープログラムの動作 を示している。  Fig. 37 is a flow chart for setting data for PLC 4 connected by a conventional different communication line, and the product number in device area 41 a of memory 40a of PLC 4a. Devices W0 to W99, which are all overnight, then devices D0 to D49, which are the number of completed production units in device area 41 of memory 40b of PLC 4b, then devices of memory 40c of PLC 4c The figure shows the operation of the user program when setting data in the order of devices R10 to 20 which are measurement value data in the area 41c.
次に、 第 34図〜第 3 6図を用いて、 従来のデ一夕収集方法について 説明する。  Next, a conventional data collection method will be described with reference to FIGS. 34 to 36.
本従来例では、 例えば、 ユーザ一の希望により、 P L C 4 aから製品番 号デ一夕であるデバイス WO〜W9 9のデータ、 P L C 4 bから生産完 了台数デ一夕であるデバイス D 0〜D 4 9のデータ、 P L C 4 Cから計 測値デ一夕であるデバイス R 1 0〜2 0のデータを収集する場合につい て説明する。 まず、 P L C 4 aから製品番号データであるデバィス WO〜W99の デ一夕収集する場合について説明する。 - ステップ S 1 60 1において、 ュ一ザ一は、 ユーザ一プログラムとし て、 コントローラ 200が P L C 4 aとの通信を行うための通信プロト コルの設定、 及び、 P L C 4 aから収集するデバイスデータ (製品番号 データであるデバイス WO〜W99) の指定、 並びに、 収集したデバイ スデ一夕の収集先ユーザバッファ及び収集のタイミング等の通信データ を作成し、 ステップ S 1 602に移行する。 In this conventional example, for example, at the request of the user, the data of the devices WO to W99, which are the product number data from the PLC 4a, and the device D0, the data of the production completed data from the PLC 4b A description will be given of a case where data of D49 and data of devices R10 to R20, which are measurement data, are collected from the PLC 4C. First, a case will be described in which data of the device numbers WO to W99, which are product number data, is collected from the PLC 4a overnight. -In step S1601, the user sets, as a user program, a communication protocol for the controller 200 to communicate with the PLC 4a, and device data collected from the PLC 4a ( Communication data such as designation of devices WO to W99), which are product number data, and a collection destination user buffer and collection timing of the collected device device are created, and the process proceeds to step S1602.
ステップ S 1 602では、 作成された通信デ一夕に基づく P L C 4 a との通信プロトコルに従って通信回線 5 aをオープンして、 ステップ S 1 603に移行する。  In step S 602, the communication line 5 a is opened according to the communication protocol with the PLC 4 a based on the created communication data, and the process proceeds to step S 603.
ステップ S 1 603では、 実際に PLC 4 aから製品番号データであ るデバイス W0〜W99のデ一夕収集を行い、 指定されたユーザーバッ ファに格納する。  In step S1603, data is collected from the PLC 4a for devices W0 to W99, which are product number data, and stored in the specified user buffer.
そして、 デ一夕収集が完了すると、 ステップ S 1 604において、 通信 データに基づく P L C 4 aとの通信プロトコルに従って通信回線 5 aを クローズする。 When the data collection is completed, in step S1604, the communication line 5a is closed according to the communication protocol with the PLC 4a based on the communication data.
このようにして、 PLC 4 aからの製品番号データであるデバイス W0 〜W99のデータ収集を行う。  In this way, the data of the devices W0 to W99, which are the product number data from the PLC 4a, are collected.
続いて、 ステップ S 1 60 5において、 全てのデバイスデ一夕の収集 が終了したか否かを判断する。 この場合、 まだ P L C 4 b及び P L C 4 cから生産完了台数デ一夕及び計測値デ一夕を収集していないので、 次 に生産完了台数データを収集すべくステップ S 1 60 1に戻り、 ステツ プ S 1 60 1からステップ S 1 604により生産完了台数データ D 1〜 D49を収集する。  Subsequently, in step S1605, it is determined whether or not collection of all device data has been completed. In this case, since the data on the number of completed products and the data on the measured values have not yet been collected from PLC 4b and PLC 4c, the process returns to step S1601 to collect data on the number of completed products. From step S 1601, data S 1 to D 49 of completed production number are collected in step S 1604.
そして、 同様に計測値デ一夕 R 1 0〜R 20を P LC 4 Cから収集して 全てのデバイスデータの収集を完了させ、 ステップ S 1 6 0 6に移行す る。 - ステップ S 1 6 0 6では、 一連のデータ収集が終了か否かを判断する。 連続で P L Cのデバイスデータを収集する場合は、 ステップ S 1 6 0 7 に移行して、 例えば次ぎのスキャンとなる任意のタイミングを待ち、 次 のスキャンすなわち、 次のデータ収集に移行して、 P L C 4 a、 4 b、 4 cに対してデータ収集を行う。 Then, in the same way, collect the measured data R10 to R20 from PLC4C. The collection of all device data is completed, and the flow shifts to step S166. -In step S166, it is determined whether a series of data collection is completed. If the device data of the PLC is to be collected continuously, go to step S1667, for example, wait for any timing to be the next scan, and then go to the next scan, that is, the next data collection, and Collect data for 4a, 4b, 4c.
ここで、 任意のタイミングとは、 一定時間間隔または P L Cのデバイス データ内容の変化等である。 Here, the arbitrary timing is a fixed time interval or a change in the device data content of the PLC.
一方、 ステップ S 1 6 0 6にて、 終了条件に合致していれば、 一連の On the other hand, in step S166, if the termination condition is met, a series of
P L Cデバイスデータの収集処理を終了する。 The PLC device data collection processing ends.
次に、 第 3 4図、 第 3 5図、 第 3 7図を用いて、 従来のデータ設定方 法について説明する。  Next, a conventional data setting method will be described with reference to FIGS. 34, 35, and 37. FIG.
本従来例では、 ユーザーの希望により、 P L C 4 aに製品番号データ であるデバイス W O〜W 9 9のデータ、 P L C 4 bに生産完了台数デ一 夕であるデバイス D 0〜D 4 9のデ一夕、 P L C 4 cに計測値データで あるデバイス R 1 0〜 2 0のデータを設定する場合について説明する。 まず、 P L C 4 aが有している製品番号データであるデバイス W 0〜 W 9 9のデータ設定する場合について説明する。  In this conventional example, according to the user's request, the data of the devices WO to W99, which are the product number data, are stored in the PLC 4a, and the data of the devices D0 to D49, which are the number of completed production units, in the PLC 4b. In the evening, a case where the data of the devices R10 to R20, which are the measurement value data, are set in the PLC 4c will be described. First, a case where data of devices W0 to W99, which are product number data of the PLC 4a, are set will be described.
ステップ S 1 7 0 1において、 ユーザ一は、 ユーザープログラムとし て、 コントロ一ラ 2 0 0が P L C 4 aとの通信を行うための通信プロト コルの設定、 及び、 P L C 4 aに対して設定するデータが格納されてュ 一ザ一バッファ、 並びに P L C 4 aに設定するデバイスデ一夕 (製品番 号デ一夕であるデバイス W O〜W 9 9 ) の指定、 及び設定のタイミング 等の通信デ一夕をユーザ一プログラムにより作成し、 ステップ S 1 7 0 2に移行する。 ステップ S 1 702では、 P LC 4 aとの通信プロトコルに従って通 信回線 5 aをオープンし、 ステップ S 1 703に移行する。 In step S1701, the user sets, as a user program, a communication protocol for the controller 200 to communicate with the PLC 4a, and sets the PLC 4a. Communication data such as the specification of the user buffer where data is stored and the device data to be set in the PLC 4a (devices WO to W99, which is the product number data) and the timing of setting. An evening is created by a user program, and the flow shifts to step S1702. In step S1702, the communication line 5a is opened according to the communication protocol with the PLC 4a, and the flow shifts to step S1703.
ステップ S 1 703では、 実際に P L C 4 aに対して指定されたュ一 ザーバッファから製品番号デ一夕であるデバィス WO〜W99のデ一夕 設定を行う。  In step S1703, the device WO-W99, which is the product number data, is actually set from the user buffer specified for the PLC 4a.
そして、 データ設定が完了すると、 ステップ S 1 704において、 P L C 4 aとの通信プロ卜コルに従って通信回線 5 aをクローズする。 When the data setting is completed, in step S1704, the communication line 5a is closed according to the communication protocol with the PLC 4a.
このようにして、 P L C 4 aに対する製品番号データであるデバイス W 0〜W99のデ一夕設定は終了である。 In this way, the setting of the devices W0 to W99, which is the product number data for the PLC 4a, is completed.
続いて、 ステップ S 1 70 5において、 全てのデバイスデータの設定 が終了したか否かを判断する。 この場合、 まだ P L C 4 b及び P L C 4 cに対して生産完了台数データ及び計測値データを設定していないので、 次に生産完了台数データを設定すべくステップ S 1 70 1に戻り、 ステ ップ S 1 70 1からステップ S 1 704により生産完了台数デ一夕 D 1 〜D 49を設定する。  Subsequently, in step S1705, it is determined whether or not all device data settings have been completed. In this case, since the production completed number data and the measured value data have not yet been set for the PLC 4b and the PLC 4c, the process returns to step S1701 to set the production completed number data. From S1701, the number of completed production units D1 to D49 is set by steps S1704.
そして、 同様に計測値デ一夕 R 1 0〜R 20を PLC4 Cに設定して全 てのデバイスデ一夕の収集を完了させ、 ステップ S 1 706に移行する。 ステップ S 1 7 06では、 一連のデータ設定が終了か否かを判断する。 連続で P L Cのデバイスデ一夕を設定する場合は、 ステップ S 1 707 に移行して、 例えば次ぎのスキャンとなるべく任意のタイミングを待ち、 次のスキャンすなわち、 次のデ一夕設定に移行して、 PLC 4 a、 4 b、 4 cに対してデ一夕設定を行う。 Then, similarly, the measurement value data R10 to R20 are set in the PLC4C to complete the collection of all the device data, and the flow shifts to step S1706. In step S 1706, it is determined whether a series of data settings has been completed. When setting the device data of the PLC continuously, go to step S1707, for example, wait for an arbitrary timing to be the next scan, and then go to the next scan, that is, move to the next data setting. , PLC 4a, 4b, and 4c are set overnight.
ここで、 任意のタイミングとは、 一定時間間隔または P L Cのデバイス デ一夕内容の変化等である。  Here, the arbitrary timing is a fixed time interval or a change in the contents of the device data of the PLC.
—方、 ステップ S 1 706にて、 終了条件に合致していれば、 一連の —In step S1706, if the termination condition is met, a series of
P L Cデバイスデ一夕の設定処理を終了する。 第 38図〜第 3 9図を用いて別の従来例を説明する。 The setting process for PLC device data is completed. Another conventional example will be described with reference to FIGS. 38 to 39.
第 38図は、 従来のデ一夕収集装置の構成を示すブロック図であり、 コ ントローラを 2台設けた場合を示している。 FIG. 38 is a block diagram showing a configuration of a conventional data collection device, showing a case where two controllers are provided.
図において、 2台のコントローラ 200、 20 1が設けられており、 そ れぞれプロトコル E用 I /F 245により通信回線 5 eを介して同一通 信プロトコルにより接続されている。 In the figure, two controllers 200 and 201 are provided, and are respectively connected by the same communication protocol via a communication line 5 e by a protocol E I / F 245.
コントローラ 200には、 プロトコル A用 I ZF 241及び通信回線 5 aにより P L C 4 aが接続されており、 コントローラ 20 1には、 プロ トコル D用 I ZF 2 34及び通信回線 5 dにより P L C 4 dが接続され ている。 The controller 200 is connected to the PLC 4a by the IZF 241 for protocol A and the communication line 5a, and the controller 201 is connected to the PLC 4d by the IZF 234 for protocol D and the communication line 5d. It is connected.
また、 コントローラ 200は、 メモリ 220内のユーザープログラム 2 2 1に基きデータ収集 Z設定等が行われる。 Further, the controller 200 performs data collection Z setting and the like based on the user program 222 in the memory 220.
その他の構成については、 上述した従来技術と同様であるので説明は 省略する。  The other configuration is the same as that of the above-described conventional technology, and thus the description is omitted.
なお、 コントローラ 200内部の C PU 2 1 0、 メモリ 220、 ユー ザ一プログラム 22 1、 CRT用 I /F 2 3 1、 キーボード用 I ZF 2 32に対応して、 コント口一ラ 20 1内部の C P U 2 1 0、 メモリ 22 The CPU 210, memory 220, user program 221, CRT I / F 231, and keyboard IZF232 in the controller 200 correspond to the controller 201 internal. CPU 210, memory 22
0、 ュ一ザ一プログラム 22 1、 CRT用 I ZF 2 3 1、 キーボード用0, User program 22 1, CRT I ZF 2 3 1, Keyboard
1 /F 232が構成されている。 1 / F 232 is configured.
第 39図は、 通信回線 5 eにより接続されたコントローラ 200、 2 Fig. 39 shows controllers 200 and 2 connected by communication line 5e.
0 1間のデータ収集 Z転送方法を示すユーザープログラムにおけるフロ —チヤ一トであり、 例えば、 コントローラ 20 1に接続されている P L C 4 dが内部に有しているデバイス領域の製品番号データであるデータ W 1 00〜W 1 99を、 コントローラ 200に接続されている P L C 4 aのデバイス領域にデ一夕 W0〜W99として設定 (転送) する一連の 処理 (ユーザ一プログラム) を示している。 なお、 各コントローラ 200、 20 1に接続されている P L C 4 a、 4 dの通信プロトコルは異なった方式のものを使用した場合である。 0 Data collection between 0 and 1 Flow chart in the user program indicating the Z transfer method, for example, product number data of the device area inside the PLC 4d connected to the controller 201 A series of processing (user-one program) for setting (transferring) data W100 to W199 as data W0 to W99 in the device area of the PLC 4a connected to the controller 200 is shown. The communication protocols of the PLCs 4a and 4d connected to the controllers 200 and 201 use different communication protocols.
ステップ S 1 80 1において、 ユーザーは、 ユーザ一プログラムとし て、 コントロ一ラ 20 1が P L C 4 dとの通信を行うための通信データ、 すなわち、 コントローラ 20 1が P L C 4 dとの通信を行うための通信 プロトコルの設定、 及び P L C 4 dから収集するデバイスデータ (製品 番号データである W1 00〜W1 99) の指定、 並びに、 収集したデバ イスデータのコントローラ 20 1における収集先ユーザバッファ及び収 集のタイミング等の通信デ一夕を作成する。  In step S1801, the user, as a user program, communicates with the controller 201 to communicate with the PLC 4d, that is, the controller 201 communicates with the PLC 4d. Communication protocol setting, and designation of device data (product number data W100 to W199) collected from the PLC 4d, and collection destination user buffer and collection of the collected device data in the controller 201. Create communication data such as timing.
また、 コントローラ 200が P L C 4 aとの通信を行うための通信デ Also, a communication data for the controller 200 to communicate with the PLC 4a.
—夕、 すなわち、 コントローラ 200が P L C 4 aとの通信を行うため の通信プロトコルの設定、 及び、 P L C 4 aに対して設定するデータが 格納されてユーザ一バッファ、 並びに P L C 4 aに設定するデバイスデ 一夕 (製品番号デ一夕であるデバイス W0〜W99) の指定、 及び設定 のタイミング等の通信データを作成する。 —Evening, that is, a communication protocol setting for the controller 200 to communicate with the PLC 4a, and a user buffer that stores data to be set for the PLC 4a and a device to be set for the PLC 4a Create communication data such as the specification of the data (device W0 to W99, which is the product number data) and the timing of the setting.
そして、 ステップ S 1 8 02移行する。 Then, the flow shifts to step S1802.
ステップ S 1802では、 コントローラ 200とコントローラ 20 1 との通信プロトコルに従って通信回線 5 eをオープンして、 ステップ S 1 80 3に移行する。  In step S1802, the communication line 5e is opened according to the communication protocol between the controller 200 and the controller 201, and the flow shifts to step S1803.
ステップ S 1 803では、 オープンされた通信回線 5 eを介してコン トロ一ラ 20 1からコントローラ 20 0への P L C 4 dの製品番号デ一 夕であるデバイス WO〜W9 9のデータ収集要求及びステップ S 1 80 1で作成したコントローラ 20 1が P L C 4 dとの通信を行うための通 信データを送信して、 ステップ S 1 804に移行する。  In step S1803, a request for data collection of the devices WO to W99, which are the product numbers of the PLC 4d, is sent from the controller 201 to the controller 200 via the opened communication line 5e. The controller 201 created in S1801 transmits communication data for communicating with the PLC 4d, and the flow shifts to step S1804.
ステップ S 1 804では、 コントローラ 200から送信されてきた通 信データに基いて、 コントローラ 20 1と PLC4 dとの通信プロトコ ルに従って通信回線 5 dをオープンして、 ステップ S 1 8 0 5に移行す る。 - ステップ S 1 8 0 5では、 実際に P L C 4 dから製品番号データであ るデバイス W 1 00〜W 1 9 9のデータ収集を行い、 コントロ一ラ 2 0 1内のメモリ 2 2 0に一旦格納し、 ステップ S 1 8 0 6に移行する。 ステップ S 1 8 0 6では、 コントローラ 2 0 0とコントローラ 2 0 1 間で通信を行うことにより、 コントローラ 2 0 1内のメモリ 2 2 0に格 納されているデバィス W 1 0 0〜W 1 9 9をコントローラ 2 0 0内のメ モリ 2 2 0に転送し、 ステップ S 1 80 7に移行する。 In step S 1804, a communication protocol between the controller 201 and the PLC 4 d is set based on the communication data transmitted from the controller 200. The communication line 5d is opened in accordance with the rules, and the flow shifts to step S1805. -In step S1805, data of devices W100 to W199, which are product number data, is actually collected from the PLC 4d, and is temporarily stored in the memory 220 of the controller 201. Then, the process proceeds to step S1806. In step S1806, by communicating between the controller 200 and the controller 201, the devices W100 to W19 stored in the memory 220 in the controller 201 are communicated. 9 is transferred to the memory 220 in the controller 200, and the flow shifts to step S1807.
ステップ S 1 8 0 7では、 コントローラ 2 0 1と P L C 4 dとの通信 プロ卜コルに従ってオープンされた通信回線 5 dをクローズし、 ステツ プ S 1 808に移行する。  In step S1807, the communication line 5d opened according to the communication protocol between the controller 201 and the PLC 4d is closed, and the flow shifts to step S1808.
ステップ S 1 8 0 8では、 コントローラ 2 0 0とコントローラ 20 1 との通信プロ卜コルに従ってオープンされた通信回線 5 eをクローズす る。  In step S1808, the communication line 5e opened according to the communication protocol between the controller 200 and the controller 201 is closed.
以上で、 P L C 4 dからの製品番号デ一夕であるデバイス W 1 0 0〜W 1 9 9のデ一夕収集は終了である。 With the above, the collection of the devices W100 to W199, which are the product numbers from the PLC 4d, is completed.
次いで、 コントローラ 2 0 0内部のメモリ 2 2 0に格納された製品番 号デ一夕であるデバイス W 1 0 0から W1 9 9を、 コントローラ 20 0 に接続されている P L C 4 aに設定するフローに入る。  Next, a flow for setting the devices W100 to W199, which are the product number data stored in the memory 220 inside the controller 200, to the PLC 4a connected to the controller 200. to go into.
ステップ S 1 8 0 9において、 P L C 4 aとの通信プロトコルに従つ て通信回線 5 aをオープンし、 ステップ S 1 8 1 0に移行する。  In step S 1809, the communication line 5 a is opened according to the communication protocol with the PLC 4 a, and the flow shifts to step S 180.
ステップ S 1 8 1 0では、 コントローラ 2 0 0と P LC 4 aとの通信 を行い、 コントローラ 2 0 0内部のメモリ 2 2 0に格納されている製品 番号データであるデバイス W 1 0 0から W 1 9 9を、 P L C 4 a内部の メモリ 40 aの領域 4 1 aに設定し、 デバイス W0〜W9 9とする。 そして、 データ設定が完了すると、 ステップ S 1 8 1 1において、 P L C 4 aとの通信プロトコルに従って通信回線 5 aをクローズして、 一連 のコントローラ 2 0 1に接続されている P L C 4 d内部の製品番号デー 夕を通信回線を介してコントローラ 2 0 0に接続されている P L C 4 a 内部に転送する処理を終了する。 In step S1810, communication between the controller 200 and the PLC 4a is performed, and the device number data W100 to W which is the product number data stored in the memory 220 inside the controller 200 is transmitted. 199 is set in the area 41a of the memory 40a inside the PLC 4a, and is set as devices W0 to W99. When the data setting is completed, in step S1811, the communication line 5a is closed in accordance with the communication protocol with the PLC 4a, and a series of products inside the PLC 4d connected to the series of controllers 201. The process of transferring the number data to the PLC 4a connected to the controller 200 via the communication line ends.
以上のように従来のデ一夕収集 Z設定方法では、 コントロ一ラに接続 された複数の P L Cがそれぞれ異なる通信プロ トコルすなわち通信回線 により接続されている場合、 コントロ一ラが各 P L Cからデ一夕収集 Z 設定するため、 ユーザープログラムにおいて、 各 P L Cとの通信を行う ための各 P L Cに対応した専用の通信プロトコルに従った通信データを 作成しなければならず、 通信プロトコルの専門知識が必要であり、 また、 各々異なる専用の通信プロトコルに従って通信回線のオープンとクロー ズ等の通信デ一夕を作成するため、 プログラムが肥大化し、 性能も低下 す-るという問題点があった。  As described above, according to the conventional data collection Z setting method, when a plurality of PLCs connected to the controller are connected by different communication protocols, that is, communication lines, the controller receives the data from each PLC. Evening collection Z To set, the user program must create communication data according to the dedicated communication protocol corresponding to each PLC to communicate with each PLC, which requires expertise in the communication protocol. In addition, there is a problem that a program is enlarged and performance is deteriorated because communication data such as opening and closing of a communication line is created according to different dedicated communication protocols.
また、 コントローラ同士を通信回線を介して接続し、 それぞれのコン トロ一ラに接続されている P L C間におけるデ一夕収集 Z設定方法では、 P L C内部のメモリにアクセスして、 デ一夕をコントロ一ラのメモリに 取り込み、 そのデータを収集したコントロ一ラから他のコントローラ、 さらには他のコントローラに接続された P L Cといったようにデ一夕の 収集 Z設定を各コントローラ毎に行う必要があり、 上述の問題点と同様 にその収集 設定を行うためのユーザープログラムが複雑、 肥大してし まうと共に、 コントローラ間のデータの収集/設定のために、 わざわざ コントローラに接続されている P L Cのメモリにアクセスするためのュ 一ザ一プログラムを作成しなければならなかった。  In addition, the controllers are connected via a communication line, and the data collection between the PLCs connected to each controller is performed. In the Z setting method, the memory inside the PLC is accessed and the data It is necessary to set the data collection Z settings for each controller, such as from the controller that collected the data to the controller and collected the data from the controller to another controller, and further to the PLC connected to the other controller. As with the problems described above, the user program for performing the acquisition and setting is complicated and bloated, and the memory of the PLC connected to the controller is bothersome to collect and set data between controllers. I had to create a user program to do this.
さらに、 ユーザープログラムの繰り返し実行を行う連続運転時には通 信時間のオーバーへッ ドが多く、 性能が低下するという問題点があった。 また、 コン卜ローラに接続された P L Cからデータを収集するための 間隔は、 ユーザープログラムにより設定されてお-り、 デバイスデータを 収集する間隔を変更するには、 ユーザ一プログラム全体を変更しなけれ ばならず、 コントローラからデバイスデータを収集する間隔を、 任意に 変更する作業の負担が大きかった。 In addition, during continuous operation in which a user program is repeatedly executed, there is a problem that communication time is excessive and performance is reduced. In addition, the interval for collecting data from the PLC connected to the controller is set by the user program. To change the interval for collecting device data, the entire user program must be changed. Therefore, the task of arbitrarily changing the interval for collecting device data from the controller was heavy.
また、 収集/設定するデータを常にリフレッシュさせるためのリフレ ッシュパラメ一夕データの設定は、 それぞれのコントローラのリフレツ シュパラメ一夕格納エリアに、 それぞれのユーザープログラムにより同 一作業の設定を行わなければならず、 作業性も悪く、 ユーザーの負担が 大きいといった問題点もあった。 発明の開示  In addition, the setting of refresh parameter overnight data for constantly refreshing the data to be collected / set must be performed in the refresh parameter overnight storage area of each controller with the same work setting by each user program. However, there were also problems such as poor workability and heavy user burden. Disclosure of the invention
本発明は、 上記の問題点を解消するためになされたものであり、 複雑 高度なユーザープログラムを作成することなく、 容易にコン卜ローラと そのコントロ一ラに接続される P L Cとの間のデ一夕処理を行えるよう なデータ処理装置及び処理方法並びにデータ処理システムを提供するこ とを目的としている。  SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and has been made in consideration of the difficulty in creating a complicated and sophisticated user program without having to create a sophisticated user program between a controller and a PLC connected to the controller. It is an object of the present invention to provide a data processing device, a processing method, and a data processing system capable of performing overnight processing.
また、 本発明は、 複数のコントローラを接続し、 各コントローラ間に おけるデータ処理も、 複雑高度なユーザープログラムを作成することの ないデータ処理装置及び処理方法を提供することを目的としている。 さらに、 本発明は、 パラメータ等のデータ設定の際の作業効率を向上 させるデータ処理装置及び処理方法を提供することを目的としている。 この目的を達成するために、 1つの観点によれば、 通信回線を介して 接続された制御対象機器との通信プロトコルを、 予め上記制御対象機器 毎に記憶する通信プロトコル記憶手段と、 この通信プロトコル記憶手段 に記憶された通信プロトコルに従い、 制御対象機器が保有するデバイス データを収集、 あるいは制御対象機器にデバイスデ一夕を設定するデバ イスデータ処理手段と、 このデバイスデータ処理手段が収集した上記デ バイスデータ、 あるいは上記制御対象機器に設定するデバイスデ一夕を 格納する共有メモリ領域と、 この共有メモリ領域と指定されたユーザー バッファとの間で、 上記デバイスデータの授受を行うデータ授受手段と、 を備えたデータ処理装置を提供する。 Another object of the present invention is to provide a data processing apparatus and a processing method in which a plurality of controllers are connected and data processing between the controllers does not create a complicated advanced user program. Still another object of the present invention is to provide a data processing apparatus and a processing method that improve the work efficiency when setting data such as parameters. In order to achieve this object, according to one aspect, a communication protocol storage unit that stores, in advance, for each of the control target devices, a communication protocol with a control target device connected via a communication line; Device owned by the controlled device according to the communication protocol stored in the storage means Device data processing means for collecting data or setting device data for the controlled device, and storing the device data collected by the device data processing device or device data set for the controlled device And a data transfer means for transferring the device data between the shared memory area and a designated user buffer.
特に、 デバイスデータ処理手段は、 制御対象機器が保有するデバイス デ一夕を収集、 あるいは制御対象機器へのデバイスデータの設定を、 所 定のタイミングで行う、 リフレッシュ制御機能を有していることとした。 また、 デバイスデータ処理手段は、 パラメータとしてデータが設定さ れている設定デ一夕ファイルより、 リフレツシュ制御を行う所定のタイ ミングを読み込むこととした。  In particular, the device data processing means must have a refresh control function for collecting device data held by the controlled device or setting device data to the controlled device at a predetermined timing. did. Further, the device data processing means reads a predetermined timing for performing the refresh control from a setting data file in which data is set as a parameter.
特に、 デ一夕授受手段は、 共有メモリ領域と指定されたユーザーバッ ファとの間の全てのデータ授受を、 予め統一設定された通信手段で行う こととした。  In particular, the data transmission / reception means is to perform all data transmission / reception between the shared memory area and the designated user buffer by the communication means set in advance.
特に、 データ授受手段は、 デバイスデータの値の変更の度に共有メモ リ領域とユーザーバッファとの間のデバイスデータ授受を行うことと した。  In particular, the data transfer means transfers device data between the shared memory area and the user buffer every time the value of the device data is changed.
特に、 各制御対象機器のデバイスデ一夕毎に、 共有メモリ領域はプロ ック分けされ、 格納されることとした。  In particular, the shared memory area is divided into blocks and stored for each device data of each device to be controlled.
また、 他の観点によれば、 通信回線を介して接続された制御対象機器 との通信プロトコルを、 予め上記制御対象機器毎に記憶された通信プロ トコル記憶手段から読み出す工程と、 読み出された通信プロトコルに従 い、 上記通信回線を介して上記制御対象機器が保有するデバイスデータ を収集、 あるいは上記制御対象機器にデバイスデータを設定する工程と、 制御対象機器から収集したデバイスデータ、 あるいは制御対象機器に設 定するデバイスデータを共有メモリ領域に格納する工程と、 共有メモリ 領域と指定されたユーザーバッファとの間で、 上記デバイスデータの授 受を行う工程と、 を備えたデータ処理方法を提供する。 According to another aspect, a step of reading a communication protocol with a control target device connected via a communication line from communication protocol storage means stored in advance for each of the control target devices; A step of collecting device data held by the controlled device via the communication line or setting device data in the controlled device according to a communication protocol; and a step of collecting device data collected from the controlled device or a controlled object. Equipment A data processing method comprising: storing device data to be specified in a shared memory area; and transmitting and receiving the device data between the shared memory area and a designated user buffer.
特に、 制御対象機器から収集したデバイスデータ、 あるいは制御対象 機器に設定するデバイスデータを共有メモリ領域に格納する工程は、 予 め設定された所定のタイミングで実行されることとした。  In particular, the process of storing the device data collected from the control target device or the device data set for the control target device in the shared memory area is performed at a predetermined timing set in advance.
また、 他の観点によれば、 第 1の通信回線を介して制御対象機器と接 続されたコントローラが、 第 2の通信回線を介して複数接続されたデー 夕処理システムにおいて、 上記コントローラは、 第 1の通信回線におけ る通信プロトコルに従い、 上記制御対象機器が保有するデバイスデ一夕 を収集、 あるいは制御対象機器にデバイスデ一夕を設定するデバイスデ 一夕処理手段と、 このデバイスデータ処理手段が収集した上記デバイス データ、 あるいは上記制御対象機器に設定するデバイスデータを格納す る共有メモリ領域と、 この共有メモリ領域と指定されたユーザーバッフ ァとの間で、 上記デバイスデ一夕の授受を行うデータ授受手段と、 第 2 の通信回線の通信プロトコルを、 予め記憶する第 2の通信プロトコル記 憶手段と、 この第 2の通信プロトコル記憶手段に記憶された上記第 2の 通信回線の通信プロトコルに従い、 上記共有メモリ領域に格納された上 記デバイスデータを、 上記第 2の通信回線を介して送信する送信手段と、 上記第 2の通信回線を介して送信されてきたデバイスデータを上記共有 メモリ領域に格納する書込み手段と、 を備えたことをデータ処理システ ムを提供する。  According to another aspect, in a data processing system in which a controller connected to a control target device via a first communication line is connected to a plurality of controllers via a second communication line, the controller includes: Device data overnight processing means for collecting the device data held by the controlled device or setting the device data to the controlled device in accordance with the communication protocol in the first communication line; Sending and receiving the device data between the shared memory area for storing the device data collected by the means or the device data to be set in the controlled device, and the user buffer designated by the shared memory area; And a second communication protocol storage means for storing in advance a communication protocol of the second communication line. Transmitting means for transmitting the device data stored in the shared memory area via the second communication line according to the communication protocol of the second communication line stored in the second communication protocol storage means; And a writing means for storing the device data transmitted via the second communication line in the shared memory area.
特に、 第 1の通信回線を介して接続された制御対象機器との第 1 の通 信プロ卜コルを、 予め上記制御対象機器毎に記憶する第 1の通信プロト コル記憶手段を備えることとした。  In particular, it is provided with a first communication protocol storage means for previously storing, for each of the control target devices, a first communication protocol with the control target device connected via the first communication line. .
特に、 デバイスデータ処理手段は、 制御対象機器が保有するデバイス デ一夕を収集、 あるいは制御対象機器へのデバイスデータの設定を、 所 定の夕イミングで順次行う、 リフレツシュ制御機能を有していることと した。 In particular, the device data processing means is a device owned by the device to be controlled. It has a refresh control function that collects data overnight or sets device data to the control target equipment in a predetermined evening sequence.
特に、 送信手段は、 共有メモリ領域に格納されているパラメ一夕に基 づき、 デバイスデ一夕を、 所定のタイミングで第 2の通信回線を介して 送信することとした。  In particular, the transmitting means transmits the device data at a predetermined timing via the second communication line based on the parameters stored in the shared memory area.
また、 送信手段は、 所定のパラメ一夕に基づき動作する起動手段から の一定間隔のタイミングで動作することとした。  Also, the transmitting means is operated at a certain interval from the starting means operating based on the predetermined parameters.
特に、 書込み手段は、 共有メモリ領域に第 2の通信回線を介して送信 されてきたデバイスデ一夕を書込む際に、 各デバイス毎のブロックに分 けて格納することとした。 ― 特に、 第 2の通信回線は、 イーサネッ トプロトコルであることとした。 特に、 共有メモリ上に格納されたパラメ一夕を、 第 2の通信回線を介 して送信することとした。  In particular, when writing the device data transmitted via the second communication line to the shared memory area, the writing means is divided into blocks for each device and stored. -In particular, the second communication line has been decided to use the Ethernet protocol. In particular, the parameters stored on the shared memory were transmitted via the second communication line.
また、 第 2の通信回線を介して送信されてきたデ一夕が、 パラメ一夕 かデバイスデータであるかを判断し、 パラメータである場合は共有メモ リ上のパラメ一夕格納エリアに格納し、 デバイスデータである場合は制 御対象機器毎の格納ェリァに格納することとした。 図面の簡単な説明  In addition, it is determined whether the data transmitted via the second communication line is a parameter or device data, and if the data is a parameter, the data is stored in the parameter storage area on the shared memory. However, if it is device data, it is stored in the storage area for each device to be controlled. BRIEF DESCRIPTION OF THE FIGURES
第 1図は、 本発明の実施例 1によるデータ収集装置の構成を示すプロ ック構成図である。  FIG. 1 is a block diagram showing a configuration of a data collection device according to a first embodiment of the present invention.
第 2図は、 本発明の実施例 1によるデータ収集手段の機能を示す機能 図である。  FIG. 2 is a functional diagram showing functions of a data collection unit according to the first embodiment of the present invention.
第 3図は、 本発明の実施例 1によるデータ収集手段内部に設けられた 共有メモリデータ収集手段の動作を示すフローチャートである。 第 4図は、 本発明の実施例 1によるデータ収集手段内部に設けられた デバイスデータ収集手段が P L Cからデ一夕を収集するための動作を示 すフローチヤ一トである。 FIG. 3 is a flowchart showing the operation of the shared memory data collecting means provided inside the data collecting means according to the first embodiment of the present invention. FIG. 4 is a flowchart showing an operation of the device data collecting means provided inside the data collecting means according to the first embodiment of the present invention for collecting data from the PLC.
第 5図は、 本発明の実施例 1による共有メモリ内容を示したメモリ構 成図である。  FIG. 5 is a memory configuration diagram showing the contents of the shared memory according to the first embodiment of the present invention.
第 6図は、 本発明の実施例 2によるデ一夕設定装置の構成を示すプロ ック構成図である。  FIG. 6 is a block diagram showing a configuration of a data setting device according to a second embodiment of the present invention.
第 7図は、 本発明の実施例 2によるデータ設定手段の機能を示す機能 図である。  FIG. 7 is a functional diagram showing functions of data setting means according to Embodiment 2 of the present invention.
第 8図は、 本発明の実施例 2によるデ一夕設定手段内部に設けられた 共有メモリデータ設定手段の動作を示すフローチヤ一卜である。  FIG. 8 is a flowchart showing the operation of the shared memory data setting means provided inside the data setting means according to the second embodiment of the present invention.
第 9図は、 本発明の実施例 2によるデータ設定手段内部に設けられた デバイスデータ設定手段が P L Cに対してデ一夕を設定するための動作 を示すフローチヤ一トである。  FIG. 9 is a flowchart showing the operation of the device data setting means provided inside the data setting means according to the second embodiment of the present invention for setting the data to the PLC.
第 1 0図は、 本発明の実施例 2による共有メモリ内容を示したメモリ 構成図である。  FIG. 10 is a memory configuration diagram showing the contents of the shared memory according to the second embodiment of the present invention.
第 1 1図は、 本発明の実施例 3によるリフレッシュ型データ収集装置 の構成を示すプロック構成図である。  FIG. 11 is a block diagram showing a configuration of a refresh-type data collecting apparatus according to Embodiment 3 of the present invention.
第 1 2図は、 本発明の実施例 3によるリフレッシュ型データ収集手段 の機能を示す機能図である。  FIG. 12 is a functional diagram showing the function of the refresh type data collecting means according to the third embodiment of the present invention.
第 1 3図は、 本発明の実施例 3によるリフレッシュ型デ一夕収集手段 内部に設けられた共有メモリデータ収集手段の動作を示すフローチヤ一 トである。  FIG. 13 is a flowchart showing the operation of the shared memory data collecting means provided inside the refresh type data collecting means according to the third embodiment of the present invention.
第 1 4図は、 本発明の実施例 3によるデータ収集手段内部に設けられ たデバイスデ一夕収集リフレツシュ手段が P L Cからデータを収集する ための動作を示すフローチヤ一トである。 第 1 5図は、 本発明の実施例 4によるリフレツシュ型データ設定装置 の構成を示すブロック構成図である。 - 第 1 6図は、 本発明の実施例 4によるリフレッシュ型データ設定手段 の機能を示す機能図である。 FIG. 14 is a flowchart showing the operation of the device data collection and refresh means provided inside the data collection means according to the third embodiment of the present invention for collecting data from the PLC. FIG. 15 is a block diagram showing the configuration of a refresh type data setting device according to Embodiment 4 of the present invention. FIG. 16 is a functional diagram showing the function of the refresh type data setting means according to Embodiment 4 of the present invention.
第 1 7図は、 本発明の実施例 4によるリフレッシュ型データ設定手段 内部に設けられた共有メモリデータ設定手段の動作を示すフローチヤ一 トである。  FIG. 17 is a flowchart showing the operation of the shared memory data setting means provided inside the refresh type data setting means according to the fourth embodiment of the present invention.
第 1 8図は、 本発明の実施例 4によるリフレッシュ型データ設定手段 内部に設けられたデバイスデ一夕設定リフレッシュ手段が、 P L Cにデ —夕を設定するための動作を示すフローチヤ一トである。  FIG. 18 is a flow chart showing an operation for setting data to the PLC by the device data setting refresh means provided inside the refresh data setting means according to the fourth embodiment of the present invention. .
第 1 9図は、 本発明の実施例 5によるデータ収集装置の構成を示すブ ロック図である。  FIG. 19 is a block diagram showing a configuration of a data collection device according to Embodiment 5 of the present invention.
第 2 0図は、 本発明の実施例 5によるデータ収集手段の機能を示す機 能図である。  FIG. 20 is a functional diagram showing the function of the data collection means according to Embodiment 5 of the present invention.
第 2 1図は、 本発明の実施例 5によるプロトコル A用デバイスデ一夕 収集手段、 プロトコル B用デバイスデータ収集手段、 プロトコル C用デ バイスデータ収集手段の動作を示すフローチヤ一トである。  FIG. 21 is a flowchart showing the operation of the protocol A device data collection means, the protocol B device data collection means, and the protocol C device data collection means according to the fifth embodiment of the present invention.
第 2 2図は、 本発明の実施例 5による P L Cデバイスデ一夕を収集す る間隔を設定したデータを保存するための補助記憶装置内のデータべ一 ス形式のファイルを示した図である。  FIG. 22 is a diagram showing a database format file in an auxiliary storage device for storing data with an interval set for collecting PLC device data according to the fifth embodiment of the present invention. .
第 2 3図は、 本発明の実施例 6によるデ一夕収集装置のシステム構成 を示すシステム構成図である。  FIG. 23 is a system configuration diagram showing a system configuration of a data collection device according to Embodiment 6 of the present invention.
第 2 4図は、 本発明の実施例 6によるデータ収集手段の機能を示す機 能図である。  FIG. 24 is a functional diagram showing functions of a data collection unit according to Embodiment 6 of the present invention.
第 2 5図は、 本発明の実施例 6によるユーザーにより共有メモリ上に 設定されたデバイスリフレッシュパラメ一夕の内容を示した図である。 第 2 6図は、 本発明の実施例 6による他のコントローラへ転送するデ バイス書き込み要求送信データ内容の一例を示した図である。 FIG. 25 is a diagram showing the contents of the device refresh parameter set on the shared memory by the user according to the sixth embodiment of the present invention. FIG. 26 is a diagram showing an example of a device write request transmission data content to be transferred to another controller according to the sixth embodiment of the present invention.
第 2 7図は、 本発明の実施例 6によるリフレツシュパラメ一夕に従つ て、 一定間隔で自コントローラデバイスデ一夕において、 他のコント口 ーラへの書き込み要求送信手段を起動する手段の動作を示すフローチヤ 一卜である。  FIG. 27 shows a means for activating a write request transmitting means to another controller in the own controller device data at regular intervals according to the refresh parameter according to the sixth embodiment of the present invention. 5 is a flowchart showing the operation of the first embodiment.
第 2 8図は、 本発明の実施例 6によるリフレツシュパラメ一夕に従つ て、 一定間隔で自コントローラデバイスデータにおいて、 他のコント口 ーラへの書き込み要求送信手段の動作を示すフローチャートである。 第 2 9図は、 本発明の実施例 6による他コントローラからの書き込み 要求を受信し、 共有メモリに書き込む手段の動作を示すフローチヤ一ト である。  FIG. 28 is a flow chart showing the operation of a means for transmitting a write request to another controller in the own controller device data at regular intervals according to the refresh parameter according to the sixth embodiment of the present invention. is there. FIG. 29 is a flowchart showing the operation of a means for receiving a write request from another controller and writing the same in the shared memory according to the sixth embodiment of the present invention.
第 3 0図は、 本発明の実施例 7によるリフレッシュパラメ一夕デ一夕 設定手段の機能を示す機能図である。  FIG. 30 is a functional diagram showing the function of the refresh parameter setting unit according to the seventh embodiment of the present invention.
第 3 1図は、 本発明の実施例 7によるデバイスリフレッシュパラメ一 夕デ一夕を他コントローラに転送する手段の動作を示すフローチヤ一ト である。  FIG. 31 is a flowchart showing the operation of the means for transferring the device refresh parameter data to another controller according to the seventh embodiment of the present invention.
第 3 2図は、 本発明の実施例 7による他コントローラからのデータを 共有メモリ上に書き込む手段の動作を示すフローチャートである。 第 3 3図は、 本発明の実施例 7によるデバイスリフレッシュパラメ一 夕データを共有メモリ上に設定するユーザープログラムの動作を示すフ ローチャートである。  FIG. 32 is a flowchart showing the operation of the means for writing data from another controller to the shared memory according to the seventh embodiment of the present invention. FIG. 33 is a flow chart showing the operation of a user program for setting device refresh parameter overnight data in a shared memory according to Embodiment 7 of the present invention.
第 3 4図は、 従来のデータ収集装置の構成を示すブロック構成図であ る。  FIG. 34 is a block diagram showing the configuration of a conventional data collection device.
第 3 5図は、 P L C 4 a、 4 b、 4 cのメモリ状態図である。  FIG. 35 is a memory state diagram of PLC 4a, 4b, 4c.
第 3 6図は、 従来の異なる通信回線で接続された P L C 4からデータ を収集するためのフローチヤ一トである。 Fig. 36 shows data from PLC 4 connected via a different conventional communication line. Is a flow chart for collecting the information.
第 37図は、 従来の異なる通信回線で接続された P L C 4に対してデ 一夕を設定するためのフローチヤ一トである。  FIG. 37 is a flowchart for setting a default for PLC 4 connected by a conventional different communication line.
第 38図は、 従来のデ一夕収集装置の構成を示すブロック図である。 第 39図は、 通信回線 5 eにより接続されたコントローラ 200、 2 FIG. 38 is a block diagram showing the configuration of a conventional data collection device. Fig. 39 shows controllers 200 and 2 connected by communication line 5e.
0 1間のデータ収集ノ転送方法を示すユーザ一プログラムにおけるフロ 一チヤ一卜である。 発明を実施するための最良の形態 13 is a flowchart in a user program showing a data collection transfer method between 0 and 1. BEST MODE FOR CARRYING OUT THE INVENTION
次に、 本発明について、 以下の通り、 実施例を説明する。  Next, examples of the present invention will be described as follows.
実施例 1. Example 1.
第 1図〜第 5図を用いて、 デ一夕収集方法に関するこの発明の実施例 1を説明する。  Embodiment 1 of the present invention relating to a data collection method will be described with reference to FIG. 1 to FIG.
第- 1図は、 本発明のデータ収集装置の構成を示すブロック構成図である。 図において、 1 00は入出力装置である CRT 2及びキーボード 3、 並 びにそれぞれ異なる通信手段により接続された P L C 4 (P L C 4 a、 PLC 4 b、 PLC 4 c) を制御するコントローラ、 1 1 0はメモリ 1 20内に展開された P L Cデバイスデ一夕収集プログラム等のユーザ一 プログラム 12 1やデータ収集手段 1 22を実行する C PU、 1 3 1は C RT 2とのインターフェース、 1 32はキーボード 3とのイン夕ーフ ェ一ス、 141、 142、 143は異なる通信プロトコルにより接続さ れる P L C 4 a、 4 b、 4 cとのイン夕一フェース、 5 a、 5 b、 5 c は異なる通信プロトコルにより接続される P L C 4 a、 4 b、 4 との 通信回線である。 FIG. 1 is a block diagram showing a configuration of a data collection device of the present invention. In the figure, reference numeral 100 denotes a controller for controlling a CRT 2 and a keyboard 3 which are input / output devices, and a PLC 4 (PLC 4a, PLC 4b, PLC 4c) connected by different communication means. Is a CPU that executes user programs 121 and data collection means 122, such as a PLC device data collection program expanded in the memory 120, 131 is an interface with CRT 2, and 132 is a keyboard Interface with 3, 141, 142, 143 are connected by different communication protocols Interface with PLC 4a, 4b, 4c, 5a, 5b, 5c are different This is a communication line with PLCs 4a, 4b, and 4 connected by the communication protocol.
第 2図は、 第 1図のメモリ 1 20内で動作するデ一タ収集手段 1 22 の機能を示す機能図であり、 図において、 1 22 1は? じ 4 &、 4 b, 4 cの保持しているデバイスデータが格納される共有メモリ、 1 2 2 2 は共有メモリ 1 2 2 1 と指定されたユーザ一バッファとの間でデバイス データの授受を行うデ一夕授受手段としてのデータ収集手段、 1 2 2 3 は P L C 4の通信プロトコルを記憶する通信プロトコル記憶手段を備え たデバイスデータ処理手段としてのデバイスデータ収集手段であり、 1FIG. 2 is a functional diagram showing the function of the data collection means 122 operating in the memory 120 of FIG. 4 &, 4b, 4 Shared memory for storing device data held by c. 1 2 2 2 is a device for exchanging device data between the shared memory 1 2 2 1 and a designated user buffer. 1 2 2 3 are device data collection means as device data processing means having communication protocol storage means for storing the communication protocol of the PLC 4;
22 3 aはプロトコル八、 例えば R S 2 3 2 cプロ卜コルで接続された PLC 4 aのデバイスデータ収集手段、 1 2 2 3 bはプロトコル B、 例 えばイーサネッ 卜プロトコルで接続された P LC 4 bのデバイスデ一夕 収集手段、 1 2 2 3 cはプロトコル C、 例えば独自 LANプロトコルで 接続された P L C 4 cのデバイスデータ収集手段である。 22 3a is the protocol 8, for example, the device data collection means of the PLC 4a connected by the RS232c protocol, and 1223b is the protocol B, for example, the PLC4 connected by the Ethernet protocol. The device data collection means of b, 1223c is the device data collection means of PLC 4c connected by protocol C, for example, a proprietary LAN protocol.
第 3図は、 デ一夕収集手段 1 2 2内部に設けられた共有メモリデ一夕 収集手段 1 2 2 2の動作を示すフローチャートであり、 ユーザープログ ラム 1 2 1が共有メモリデータ収集手段 1 2 2 2を呼び出し、 異なる通 信回線で接続された P L C 4 a、 4 b、 4じから、 まず、 P L C 4 aの 製品番号データであるデバイス WO〜W9 9、 次に P L C 4 bの生産完 了台数データであるデバイス D 0〜D 4 9、 次に P L C 4 cの計測値デ 一夕であるデバイス R 1 0〜2 0の順にデバイスデータを収集するため の、 ユーザープログラム 1 2 1および共有メモリデータ収集手段 1 2 2 2の動作を示すフローチヤ一トである。  FIG. 3 is a flowchart showing the operation of the shared memory data collection means 122 provided inside the data collection means 122, wherein the user program 122 is composed of the shared memory data collection means 122. 2 Call 2 and start from PLCs 4a, 4b, and 4 connected by different communication lines, first, production of device WO-W99, which is the product number data of PLC 4a, and then completion of production of PLC 4b User program 1 2 1 and shared memory for collecting device data in order of device data D 0 to D 49, and then to device R 1 0 to 20 which is the measured value data of PLC 4 c 5 is a flowchart showing the operation of the data collection means 122.
第 4図は、 デ一夕収集手段 1 2 2内部に設けられたデバイスデ一夕収 集手段 1 22 3が P L C 4からデ一夕を収集するための動作を示すフロ 一チャートであり、 特にプロトコル A用デバイスデータ収集手段 1 2 2 FIG. 4 is a flowchart showing the operation of the device data collection means 1223 provided inside the data collection means 122 for collecting data from the PLC 4. Device data collection means for protocol A 1 2 2
3 aが PLC 4 aから製品番号データであるデバイス WO〜W 9 9のデ —タを収集するための動作を示している。 3a shows an operation for collecting data of devices WO to W99, which are product number data, from the PLC 4a.
第 5図は、 共有メモリ 1 0内容を示したメモリ構成図である。  FIG. 5 is a memory configuration diagram showing the contents of the shared memory 10.
次に、 本実施例 1 におけるデータ収集装置の動作について説明する。 まず始めに、 第 2図を用いて概略の動作を説明する。 Next, the operation of the data collection device according to the first embodiment will be described. First, a schematic operation will be described with reference to FIG.
ユーザ一 (オペレータ) は、 収集したいデバイスデータ、 すなわちデ バイスデータが格納されている P L C、 及び収集したデバイスデータを 格納する収集格納先ユーザーバッファ並びに共有メモリ領域 1 22 1上 のデバイスデータ格納領域を対話形式により指定する。  The user (operator) allocates the device data to be collected, that is, the PLC that stores the device data, the collection storage destination user buffer that stores the collected device data, and the device data storage area on the shared memory area 1221. Specify interactively.
ユーザーによる P L Cの指定により、 C PU 1 1 0は、 デバイスデ一 夕収集手段 1 223 a、 1 223 b、 1 2 2 3 cに対して、 ユーザ一か ら指示された P L Cを指示し、 起動をかけさせる。  According to the user's designation of the PLC, the CPU 110 instructs the device data collection means 1 223 a, 1 223 b, and 122 3 c with the PLC specified by the user and starts up. To be applied.
デバイスデータ収集手段 1 223 a、 1 22 3 b、 1 22 3 cでは、 内部に記憶されている各通信プロトコルに従い実際に P L C 4 a、 4 b、 4 cと通信を行い、 PLC 4 a、 4 b、 4 cからデバイスデータを収集 し、 共有メモリ 1 22 1に格納する。  The device data collection means 1 223a, 1223b, and 1223c actually communicate with the PLCs 4a, 4b, and 4c according to each communication protocol stored inside, and b, 4 Collect device data from c and store it in shared memory 1221.
共有メモリデ一夕収集手段 1 222は、 デバイスデ一夕収集手段 1 2 23 a, 1 223 b, 1 22 3 cが収集し共有メモリ 122 1に格納し た P LC 4 a、 4 b、 4 cのデバイスデータをユーザ一が指定した収集 格納先ユーザーバッファに格納する。  The shared memory data collection means 1 222 is composed of the PLCs 4 a, 4 b, and 4 c collected by the device data collection means 1 2 23 a, 1 223 b, and 122 3 c and stored in the shared memory 122 1. Device data in the user buffer specified by the user.
このようにして、 ユーザーはデバイスデ一夕を収集したい P L C及び 格納する収集格納先ユーザーバッファ並びに共有メモリ領域 1 22 1上 のデバイスデータ格納領域を指定することのみにより、 指定した P L C のデバイスデ一夕を収集することができる。  In this way, the user only needs to specify the PLC from which the device data is to be collected, the collection and storage destination user buffer for storing the device data, and the device data storage area in the shared memory area 1221, so that the device data of the specified PLC can be collected. Evening can be collected.
次に、 データ処理装置の動作、 すなわち、 PL C 4 aから製品番号デ 一夕であるデバイス W0〜W99のデータを、 P L C 4 bから生産完了 台数データであるデバイス D 0〜D 49のデータを、 PLC4 cから計 測値データであるデバイス R 1 0〜2 0のデ一夕を収集するための動作 を第 3図、 第 5図を用いて詳細に説明する。  Next, the operation of the data processing device, that is, the data of the devices W0 to W99, which is the product number data, is output from the PLC 4a, and the data of the devices D0 to D49, which are the production completed number data, are output from the PLC 4b. The operation for collecting the data of the devices R10 to 20 as the measurement data from the PLC 4c will be described in detail with reference to FIGS.
まず、 ユーザー自らがメモリにユーザープログラムとして書き込む作 業について説明する。 First, the work that the user himself writes to memory as a user program Explain the business.
ユーザ一は、 収集するデバイスデ一夕が格納された P L Cを指定する と共に、 収集したデバイスデータを格納する収集格納先ユーザーバッフ ァ並びに共有メモリ領域 1 2 2 1上のデバイスデータ格納領域を指定す るを指定するユーザープログラムを作成してメモリ 1 2 0に書き込み、 ユーザー自身の処理は終了する。  The user specifies the PLC in which the device data to be collected is stored, and also specifies the collection storage destination user buffer for storing the collected device data and the device data storage area in the shared memory area 122 1 Create a user program to specify the password and write it to the memory 120, and end the user's own processing.
本実施例では、 P L C 4 aから製品番号デ一夕であるデバイス W 0〜 W 9 9のデータを収集して、 収集格納先ユーザーバッファに格納する作 業、 及び P L C 4 bから生産完了台数データであるデバイス D 0〜D 4 9のデ一夕を収集して、 収集格納先ユーザーバッファに格納する作業、 P L C 4 cから計測値データであるデバイス R 1 0〜 2 0のデ一夕を収 集して、 任意の収集格納先ユーザーバッファに格納する作業である。 つまり、 ユーザ一は、 デバイスデータが格納された P L Cの指定と収集 格納先ユーザーバッファの指定並びに共有メモリ領域 1 2 2 1上のデバ イスデータ格納領域の指定を、 3回繰り返すこととなる。  In this embodiment, the data of the devices W0 to W99, which are the product number data, are collected from the PLC 4a and stored in the user buffer at the collection storage destination, and the production completed number data is collected from the PLC 4b. Collect data from devices D0 to D49 and store them in the user buffer for collection and storage, and collect data from devices R10 to 20 that are measurement data from PLC 4c. This is the task of collecting data and storing it in an arbitrary user buffer for collection and storage. In other words, the user repeats the specification of the PLC in which the device data is stored, the specification of the user buffer for collection and storage, and the specification of the device data storage area on the shared memory area 1221, three times.
次に、 ユーザ一により書き込まれたユーザープログラムに基づき動作 するデータ収集装置内部のデータ収集手段の動作について説明する。 ユーザーにより書き込まれたユーザープログラムは、 ステップ S 1 0 1において、 共有メモリデ一夕収集手段 1 2 2 2に対し、 P L C 4 aか ら収集したい製品番号データであるデバイス W O〜W 9 9、 一時的に記 憶する共有メモリ領域 1 2 2 1上の P L C 4 a用デバイスデータ格納領 域 1 2 2 1 a、 及び最終的に格納する収集格納先ユーザーバッファを指 示して、 共有メモリデータ収集手段 1 2 2 2を呼び出し、 ステップ S 1 0 2に移行する。  Next, the operation of the data collection means in the data collection device that operates based on the user program written by the user will be described. In step S101, the user program written by the user sends to the shared memory data collection means 1222 a device WO to W99, which is the product number data to be collected from the PLC 4a, temporarily. The shared memory data collection means 1 indicates the device data storage area 1 2 2 1a for the PLC 4a on the shared memory area 1 2 2 1 and the collection storage destination user buffer to be finally stored. Call 2 2 2 and go to step S 102.
ステップ S 1 0 2において、 共有メモリデータ収集手段 1 2 2 2は、 コントローラ 1 0 0に接続された P L Cに対応して予め対応して記憶さ れている通信プロ卜コルの中から、 実際に P L C 4 aと通信を行う通信 プロ卜コルすなわちプロトコル A用デバイスデータ収集手段 1 2 2 3 a を選択し、 そのプロトコル A用デバイスデータ収集手段 1 2 2 3 aに対 し、 P L C 4 aから収集したいデバイスデータ及び P L C 4 aから収集 したデバイスデ一夕を一時記憶する共有メモリ上の格納領域 1 2 2 1 a を指示し、 プロトコル A用デバイスデータ収集手段 1 2 2 3 aを起動さ せて P L C 4 a内部に格納されているデバイスデ一夕すなわち製品番号 デ一夕を、 共有メモリ 1 2 2 1内部に一時記憶させ (プロトコル A用デ バイスデータ収集手段 1 2 2 3 aの動作については後述する) 、 ステツ プ S 1 0 3に移行する。 In step S102, the shared memory data collection means 1222 stores the data corresponding to the PLC connected to the controller 100 in advance. The communication protocol that actually communicates with the PLC 4a, that is, the protocol A device data collection means 1 2 2 3a, is selected from among the communication protocols used, and the protocol A device data collection means 1 is selected. For 2 23 a, indicate the storage area 1 2 2 1 a on the shared memory that temporarily stores the device data to be collected from the PLC 4 a and the device data collected from the PLC 4 a. Activate the data collection means 1 2 2 3a and temporarily store the device data stored in the PLC 4a, that is, the product number data, in the shared memory 1221 (protocol A data). The operation of the device data collection means 122 a will be described later), and the process proceeds to step S103.
ステップ S 1 0 3では、 共有メモリ 1 2 2 1内部の P L C 4 aデバイ スデ一夕格納領域 1 2 2 1 aから、 プロトコル A用デバイスデ一夕収集 手段 1 2 2 3 aが格納した、 製品番号デ一夕であるデバイス W O〜W 9 9のデータを、 ユーザープログラムによりユーザーが指定した収集格納 先ユーザーバッファに格納する。  In step S103, the device data collection device for protocol A 1 2 2 3a stored from the PLC 4a device data storage area 1 2 2 1a inside the shared memory 1 2 2 1 The data of the devices WO to W99, which is the product number data, is stored in the user buffer specified by the user by the user program.
このステップ S 1 0 1からステップ S 1 0 3の動作により、 P L C 4 aからの製品番号デ一夕であるデバイス W O〜W 9 9のデ一夕を、 ユー ザ一が指定した収集格納先ユーザ一バッファに格納する一連の作業が終 了する。  By the operation from step S101 to step S103, the device WO-W99, which is the product number from the PLC 4a, is stored in the collection storage destination user designated by the user. A series of operations for storing data in one buffer is completed.
次に、 P L C 4 bから生産完了台数デ一夕であるデバイス D 0〜D 4 Next, the devices D 0 to D 4 that are the number of completed production
9のデータを収集するため、 ステップ S 1 0 4において、 ュ一ザ一プロ グラム 1 2 1は共有メモリデータ収集手段 1 2 2 2に対し、 P L C 4 b から収集したい生産完了台数データであるデバイス D 0〜D 4 9、 およ び共有メモリ領域 1 2 2 1上の P L C 4 b用デバイスデ一夕格納領域 1 2 2 1 bおよび収集格納先ユーザーバッファを指示し、 共有メモリデー 夕収集手段 1 2 2 2を呼び出す。 ステップ S 1 05にて、 共有メモリデータ収集手段 1 222はプロト コル B用デバイスデータ収集手段 1 223 bに対-し、 PLC 4 bから収 集したいデバイスデータ格納領域 1 22 1 bおよび P L C 4 bデバイス データの共有メモリ上の格納領域 1 22 1 bを指示し、 プロトコル B用 デバイスデータ収集手段 1 223 bを起動する。 In order to collect the data of No. 9, in step S104, the user program 1 2 1 2 sends the shared memory data collection means 1 2 2 2 D 0 to D 49 and the shared memory area 1 2 2 1 The device data storage area 1 2 2 1 b for PLC 4 b and the collection storage destination user buffer are specified, and the shared memory data collection means 1 Call 2 2 2 In step S105, the shared memory data collection means 1 222 responds to the device data collection means 1 223b for protocol B, and the device data storage areas 1221 b and PLC 4 b to be collected from the PLC 4b. The storage area 1221 b of the device data on the shared memory is designated, and the device data collection means 1 223 b for protocol B is started.
そして、 ステップ S 1 06にて、 ユーザ一プログラム 12 1は共有メ モリ 1 2 2 1の、 P LC 4 bデバイスデータ格納領域 1 22 1 から、 プロトコル B用デバイスデータ収集手段 1 22 3 bが格納した、 製品番 号デ一夕であるデバイス D 0〜D 49のデータを共有メモリデータ収集 手段 1 2 22を使用してユーザープログラム 1 2 1が収集格納先ユーザ —バッファに収集する。 以上で、 P L C 4 bからの製品番号デ一夕であ るデバイス D 0〜D 49のデ一夕収集が終了する。  Then, in step S106, the user program 12 1 stores the protocol B device data collection means 1223b from the PLC 4b device data storage area 1221 of the shared memory 1221. Then, the user program 122 collects the data of the devices D0 to D49, which are the product number data, in the shared memory data collection means 1222 in the storage destination user buffer. This completes the data collection for devices D0 to D49, which is the product number data from PLC 4b.
また、 PLC 4 cから計測値デ一夕であるデバイス R 1 0〜20のデ 一夕を収集するため、 ステップ S 1 0 7において、 ュ一ザ一プログラム 12 1は共有メモリデータ収集手段 1 222に対し、 P LC 4 cから収 集したい計測値デ一夕であるデバイス R 1 0〜20、 および共有メモリ 領域 1 2 2 1上の P L C 4 C用デバイスデータ格納領域 1 22 1 cおよ び収集格納先ユーザ一バッファを指示し、 共有メモリデー夕収集手段 1 222を呼び出す。  Also, in order to collect the data of the devices R 10 to 20 which are the measured data from the PLC 4 c, in step S 107, the user program 121 executes the shared memory data collection means 1 222. In contrast, the device R10 to 20, which is the measurement data to be collected from the PLC 4c, and the device data storage area 1221c for the PLC 4C on the shared memory area 1221, and The user specifies the collection / storage destination user buffer and calls the shared memory data collection means 1 222.
ステツプ S 1 08にて、 共有メモリデ一夕収集手段 1 222はプロト コル C用デバイスデ一夕収集手段 1 22 3 cに対し、 P L C 4 cから収 集したいデバイスデ一夕格納領域 1 22 1 cおよび P L C 4 cデバイス デ一夕の共有メモリ上の格納領域 1 22 1 cを指示し、 プロトコル C用 デバイスデータ収集手段 1 223 cを起動。  In step S 108, the shared memory data collection means 1 222 stores the device data storage area to be collected from the PLC 4 c in contrast to the device data collection means 122 3 c for protocol C. And the PLC 4c device Instruct the storage area 1221c on the shared memory of the device memory and start the device data collection means 1223c for protocol C.
そして、 ステップ S 1 09にて、 ュ一ザ一プログラム 1 2 1は共有メ モリ 1 22 1の、 PLC 4 Cデバイスデータ格納領域 1 22 1 cから、 プロトコル C甩デバイスデ一夕収集手段 1 223 cが格納した、 計測値 データであるデバイス R 1 0〜20のデータを共有メモリデータ収集手 段 1 222を使用してユーザープログラム 1 2 1が収集格納先ユーザ一 バッファに収集する。 以上で、 P L C 4 cからの製品番号データである デバイス R 1 0〜 20のデータ収集が終了する。 Then, in step S109, the user program 1221 reads the shared memory 1221 from the PLC 4C device data storage area 1221c. Protocol C 甩 Device data overnight collection means 1 User data 1 2 1 collects and stores the data of device R 10 to 20 as measurement value data stored in 223 c using shared memory data collection means 1 222 Collect in the first user buffer. This completes the data collection of the devices R10 to R20, which are the product number data from the PLC 4c.
次に、 コントローラ 1 00のデバイスデ一夕収集手段 1 223 a、 1 223 b, 1 223 cの動作を第 4図、 第 5図を用いて説明する。  Next, the operation of the device data collection means 1223a, 1223b, and 1223c of the controller 100 will be described with reference to FIGS.
デバイスデータ収集手段 1 223 a、 1 223 b、 1 22 3 cは、 そ れぞれプロトコルが異なっているだけであり、 処理手順は同一であるた め、 プロトコル A用デバイスデータ収集手段 1 223 aを用いて動作を 説明する。  The device data collection means 1 223a, 1 223b, and 1223c are different from each other only in the protocol, and have the same processing procedure. Therefore, the device data collection means for protocol A 1 223a The operation is explained using.
まず、 共有メモリデ一夕収集手段 1 222により、 PL C 4 aから製 品番号デ一夕であるデバイス W0〜W 99のデータを収集するため、 製 品番号データであるデバイス WO〜W 99のデータ収集指示を受け、 デ バイスデ一夕収集手段 1 22 3 aが起動される。  First, in order to collect the data of the devices W0 to W99, which are the product numbers, from the PLC 4a by the shared memory data collection means 1222, the data of the devices WO to W99, which are the product number data, are collected. Upon receiving the collection instruction, the device collection device 1223a is activated.
プロトコル A用デバイスデータ収集手段 1 223 aは、 ステップ S 2 0 1において、 内部に格納されている P LC 4 aとのプロ卜コル Aの通 信手順に従って、 通信回線 5 aをオープンする。  In step S201, the protocol A device data collection means 1 223a opens the communication line 5a in accordance with the protocol A communication procedure with the PLC 4a stored therein.
次に、 ステップ S 202において、 P LC4 aと通信し、 PLC 4 a のメモリ 40 aに格納されている製品番号データであるデバイス W0〜 W99のデータ 41 aを収集する。  Next, in step S202, communication is performed with the PLC 4a to collect data 41a of the devices W0 to W99, which are product number data stored in the memory 40a of the PLC 4a.
そして、 ステップ S 203において、 収集した製品番号デ一夕であるデ バイス W0〜W99のデータを、 所定の共有メモリ 1 22 1の PLC 4 a用デバイスデータ格納領域 1 22 1 aに格納する。 (第 5図参照) ステップ S 204では、 P L C 4 aとの通信手順に従って、 通信回線 Then, in step S203, the data of the devices W0 to W99, which are the collected product number data, are stored in the PLC 4a device data storage area 1221a of the predetermined shared memory 1221. (Refer to Fig. 5) In step S204, the communication line is set according to the communication procedure with PLC 4a.
5 aをクローズする。 以上で、 P L C 4 aからの製品番号データであるデバイス W O〜W 9 9 のデータ収集が終了する。 - 本実施例 1によれば、 ユーザーは、 デ一夕収集先の P L C (デバイス データの対象) と、 収集したデ一夕を格納する収集格納先ユーザ一バッ ファ並びに共有メモリ領域 1 2 2 1上のデバイスデータ格納領域とを指 定することにより、 メモリ内部に格納されたデータ収集手段が起動し、 デ一タ収集の対象 P L Cとの通信プロトコル及び回線オープン/クロ一 ズの設定を自動的に行い、 収集した P L Cのデータを共有メモリに一旦 格納した後、 ユーザーに指定されたユーザ一バッファに格納される。 そ のため、 ユーザーは共有メモリの内容のみを意識すればよく、 ユーザー 自らが、 各通信プロトコルに対応したユーザ一プログラムをデータ処理 のたびに作成する必要がなくなり、 通信プロ卜コルの専門知識を必要と せずに、 プログラムを簡単に作成でき、 作業性が向上する。 5 Close a. This completes the data collection of the devices WO to W99, which are the product number data from the PLC 4a. -According to the first embodiment, the user is required to collect the data (the target of the device data) of the data collection destination, the collection storage destination user buffer for storing the collected data, and the shared memory area. By specifying the above device data storage area, the data collection means stored in the memory is activated and the communication protocol with the target PLC for data collection and the setting of line open / close are automatically set. After the collected PLC data is once stored in the shared memory, it is stored in the user buffer specified by the user. Therefore, the user only needs to be aware of the contents of the shared memory, which eliminates the need for the user to create a user program corresponding to each communication protocol every time data processing is performed. Easily create programs without the need for improved workability.
また、 一旦共有メモリに格納するため、 ユーザ一の指定したユーザー バッファに格納する際にも、 共有メモリとユーザーバッファとのデータ 授受を考慮すればよく、 共有メモリデータ収集手段のプログラム処理が 簡単な構成となり、 プログラム処理に要する時間も短縮でき、 デ一夕処 理装置 (コントローラ) の性能が向上する。  In addition, since the data is temporarily stored in the shared memory, the data transfer between the shared memory and the user buffer may be considered when storing the data in the user buffer designated by the user. With this configuration, the time required for program processing can be shortened, and the performance of the overnight processing unit (controller) improves.
さらに、 実際の P L C 4との通信はデバイスデータ収集手段に任せ、 ユーザ一プログラムからは共有メモリアクセスのみを行うため、 処理能 力も向上する。  Furthermore, the actual communication with the PLC 4 is left to the device data collection means, and only the shared memory access is performed from a single user program, thus improving the processing performance.
実施例 2 .  Example 2.
第 6図〜第 1 0図を用いて、 データ設定方法に関するこの発明の実施 例 2を説明する。  Embodiment 2 of the present invention relating to a data setting method will be described with reference to FIGS. 6 to 10. FIG.
第 6図は、 本発明のデータ設定装置の構成を示すブロック構成図である c 図において、 1 2 3はメモリ 1 2 0内で動作するデ一夕設定手段であつ て、 他の実施例 1と同一符号は、 同一または相当部分を示している。 第 7図は、 データ設定手段 1 23の機能を示す機能図であり、 図にお いて、 1 2 3 1は PLC4 a、 4 b、 4 cに設定するデバイスデータが 格納されている共有メモリ、 1 232は共有メモリ 1 23 1と指定され たユーザ一バッファとの間でデバィスデ一夕の授受を行うデータ授受手 段としての共有メモリデータ設定手段、 1 2 3 3は PLC 4の通信プロ トコルを記憶する通信プロトコル記憶手段を備えたデバイスデータ処理 手段としてのデバイスデ一夕設定手段であり、 1 233 aはプロトコル A、 例えば R S 232 cプロトコルで接続された P L C 4 aのデバイス デ一夕設定手段、 1 233 bはプロトコル B、 例えばイーサネッ トプロ 卜コルで接続された PLC 4 bのデバイスデータ設定手段、 1 233 c はプロトコル〇、 例えば独自 LANプロトコルで接続された P L C 4 c のデバイスデータ設定手段である。 Figure 6 is the c Figure is a block diagram showing the configuration of the data setting apparatus of the present invention, 1 2 3 filed by de Isseki setting means operating in memory 1 2 within 0 The same reference numerals as those of the other embodiment 1 indicate the same or corresponding parts. FIG. 7 is a functional diagram showing the function of the data setting means 123. In the figure, 123 is a shared memory storing device data to be set in the PLCs 4a, 4b, and 4c. 1 232 is a shared memory data setting means as a data transfer means for sending and receiving device data between the shared memory 123 1 and a designated user buffer, and 1 2 3 3 is a communication protocol of the PLC 4. Device data setting means as device data processing means provided with a communication protocol storage means for storing, where 1 233a is a device A setting means for a PLC 4a connected by a protocol A, for example, an RS 232c protocol. 1233b is the protocol B, for example, the device data setting means of PLC 4b connected by Ethernet protocol, and 1233c is the protocol II, for example, the device data setting of PLC 4c connected by original LAN protocol It is a stage.
第 8図は、 共有メモリデータ設定手段 1 2 32の動作を示すフローチ ヤートであり、 ユーザープログラム 1 2 1が共有メモリデ一夕設定手段 1 232を呼び出し、 異なる通信回線で接続された P L C 4 a、 4 b、 4 cに対して、 まず、 PLC 4 aの製品番号データであるデバイス W0 〜W9 9、 次に? L C 4 bの生産完了台数データであるデバイス D 0〜 D 49、 次に P L C 4 cの計測値デ一夕であるデバイス R 1 0〜 20の 順にデバイスデ一夕を設定するための、 ユーザ一プログラム 1 2 1およ び共有メモリデータ設定手段 1 2 32の動作を示している。  FIG. 8 is a flowchart showing the operation of the shared memory data setting means 1 2 32.The user program 1 2 1 calls the shared memory data setting means 1 2 3 For 4b and 4c, first, devices W0 to W99, which are the product number data of PLC 4a, and then? User D0 to D49, which is the data on the number of completed production units of the LC 4b, and device R10, which is the measurement data of the PLC 4c. It shows the operation of the program 1 2 1 and the shared memory data setting means 1 2 32.
第 9図は、 デバイスデ一夕設定手段 1 233が PLC 4に対してデー 夕を設定するための動作を示すフローチヤ一トであり、 特にプロトコル A用デバイスデータ設定手段 1 233 aが PLC 4 aに対して製品番号 デ一夕であるデバイス W0〜W99のデータを設定するための動作を示 している。 第 1 0図は、 共有メモリの内容を示したメモリ構成図である。 FIG. 9 is a flow chart showing the operation of the device data setting means 1233 for setting data to the PLC 4. In particular, the device data setting means 1 233a for protocol A is the PLC 4a. The figure shows the operation for setting the data of the devices W0 to W99, which is the product number for the product. FIG. 10 is a memory configuration diagram showing the contents of the shared memory.
次に、 本実施例 2におけるデータ設定装置の動作について説明する。 まず始めに、 第 7図を用いて概略の動作を説明する。  Next, the operation of the data setting device according to the second embodiment will be described. First, a schematic operation will be described with reference to FIG.
ユーザーは、 デバイスデータを設定するデバイス、 すなわち対象とな る PLC 4、 及び P L C 4に設定するためのデバイスデータが格納され ているユーザーバッファを指定する。  The user specifies the device for which the device data is to be set, that is, the target PLC 4 and the user buffer in which the device data for setting the PLC 4 is stored.
ユーザーによるユーザープログラム 1 2 1から呼ばれる、 共有メモリ デ一夕設定手段 1 2 32は、 P L C 4に設定するためのデバイスデータ を、 共有メモリ 1 22 1に格納し、 デバイスデータ設定手段 1 233 a、 1 233 b, 1 233 cに起動をかける。  The shared memory data setting means 1 232 called from the user program 122 by the user stores the device data for setting in the PLC 4 in the shared memory 1221, and the device data setting means 1 233a, Start 1 233 b, 1 233 c.
起動されたデバイスデ一夕設定手段 1 2 33 a、 1 23 3 b, 1 233 cでは、 内部に記憶されている各通信プロ卜コルに従い実際に P L C 4 a、 4 b、 4 cと通信を行い、 PLC 4 a、 4 b、 4 cに対してデバイ スデ一夕を設定する。 The activated device data setting means 1 233 a, 1 233 b, and 1 233 c actually communicate with the PLCs 4 a, 4 b, and 4 c according to each communication protocol stored inside. And set the device device overnight for the PLCs 4a, 4b, and 4c.
このようにして、 ユーザ一はデバイスデ一夕を設定したい P L C及び 設定するためのデバイスデータが格納されたユーザーバッファを指定す ることのみにより、 指定した P L Cへのデバイスデータの設定を行うこ とができる。  In this way, the user can set the device data to the specified PLC only by specifying the PLC to set the device data and the user buffer storing the device data to be set. Can be.
次に、 データ処理装置の動作、 すなわち、 PLC 4 aに製品番号デ一 夕であるデバイス W0〜W99のデ一夕を、 PL C 4 bに生産完了台数 データであるデバイス D 0〜D 49のデータを、 P L C 4 cに計測値デ —夕であるデバイス R 1 0〜 20のデータを設定するための動作を第 8 図、 第 1 0図を用いて詳細に説明する。  Next, the operation of the data processing device, i.e., the data of device W0 to W99, which is the product number data, is stored in the PLC 4a, and the data of the devices D0 to D49, which is the production completed number data, is stored in the PLC 4b. The operation for setting the data of the devices R10 to 20, which are the measured data to the PLC 4c, will be described in detail with reference to FIGS. 8 and 10. FIG.
まず、 ユーザー自らがメモリにユーザ一プログラムとして書き込む作 業について説明する。  First, the task of writing the user program into the memory by the user himself will be described.
ユーザーは、 P L Cに設定したいデバイス、 及び設定するデバイスデ 一夕が格納されたユーザ一バッファ、 並びに共有メモリ領域 1 2 3 1上 のデバイスデータ設定領域を指定するユーザープログラムを作成してメ モリ 1 2 0に書き込み、 ユーザー自身の処理は終了する。 The user can specify the device to be set in the PLC and the device data to be set. Create a user program that specifies the user buffer in which the data is stored and the device data setting area on the shared memory area 123, write it to the memory 120, and end the user's own processing.
本実施例では、 ユーザーバッファに格納されているデバイスデ一夕を、 P L C 4 aに製品番号データとしてデバィス W O〜W 9 9を設定する作 業、 及びユーザーバッファに格納されているデバイスデータを、 P L C 4 bに生産完了台数データとしてデバイス D 0〜D 4 9を設定する作業、 ユーザ一バッファに格納されているデバイスデータを、 P L C 4 cに計 測値データであるデバイス R 1 0〜 2 0を設定する作業である。  In this embodiment, the device data stored in the user buffer is stored in the PLC 4a, and the device data stored in the user buffer is stored in the user buffer. Work to set devices D0 to D49 as production completed number data in PLC 4b, device data stored in user buffer, and device R10 to 20 as measured data in PLC 4c This is the task of setting.
次に、 ュ一ザ一により書き込まれたユーザープログラムに基づき動作 するデータ設定装置内部のデ一夕設定手段の動作について説明する。 ユーザ一により書き込まれたユーザープログラムは、 ステップ S 3 0 1において、 共有メモリデータ設定手段 1 2 3 2に対し、 P L C 4 aに 設定する製品番号データであるデバイス W O〜W 9 9、 及び共有メモリ 領域 1 2 3 1上の P L C 4 a用デバイスデータ設定領域 1 2 3 1 a、 並 びに設定データのユーザーバッファを指示して、 共有メモリデ一夕設定 手段 1 2 3 2を呼び出し、 ステップ S 3 0 2に移行する。  Next, the operation of the data setting device inside the data setting device that operates based on the user program written by the user will be described. In step S301, the user program written by the user sends to the shared memory data setting means 1222 a device WO to W99, which is the product number data set in the PLC 4a, and the shared memory. Device data setting area for PLC 4a on area 1 2 3 1 1 2 3 1a, and also instruct the user buffer for setting data, call the shared memory data setting means 1 2 3 2 and call step S3 0 Move to 2.
ステップ S 3 0 2において、 共有メモリデ一夕設定手段 1 2 3 2は、 共有メモリ領域 1 2 2 1の P L C 4 aに設定したいデバイスデータ設定 領域 1 2 3 1 aにユーザ一プログラムから取得した設定データを格納し、 ステップ S 3 0 3に移行する。  In step S302, the shared memory data setting means 1 2 3 2 sets the device data setting area 1 2 3 1a to be set in the PLC 4a of the shared memory area 1 2 2 1 in the setting obtained from the user program. The data is stored, and the flow shifts to step S303.
ステップ S 3 0 3では、 プロトコル A用デバイスデ一夕設定手段 1 2 3 3 aに対し、 P L C 4 aに設定したいデバイス、 及び P L C 4 aに対 する設定データの共有メモリ上の設定領域 1 2 3 1 aを指示し、 プロ卜 コル A用デバイスデータ設定手段 1 2 3 3 aを起動させて、 共有メモリ 1 2 3 1上の P L C 4 a用デバイスデ一夕設定領域 1 2 3 1 aに記憶さ れているデバイス W O〜W 9 9すなわち製品番号データを、 P L C 4 a に設定させ、 (プロトコル A用デバイスデータ設定手段 1 2 3 3 aの動 作については後述する) ステップ S 3 0 4に移行する。 In step S303, the protocol A device data overnight setting means 1 2 3 3a sets the device to be set in the PLC 4a and the setting area 1 2 in the shared memory of the setting data for the PLC 4a. 3 Instruct 1a to activate the device data setting means for protocol A 1 2 3 3a, and to the device data setting area 1 2 3 1a for PLC 4a on the shared memory 1 2 3 1 Remembered Device WO-W99, that is, the product number data, is set in the PLC 4a (the operation of the device data setting means for protocol A 1 2 3 3a will be described later). I do.
このステップ S 3 0 1からステップ S 3 0 3の動作により、 P L C 4 aに製品番号データであるデバイス W 0〜W 9 9のデ一夕を設定する一 連の作業が終了する。  By the operation from step S301 to step S303, a series of operations for setting the device number data as devices W0 to W99 in PLC 4a is completed.
次に、 P L C 4 bに対して生産完了台数データであるデバイス D 0〜 D 4 9のデータを設定するため、 ステップ S 3 0 4において、 ユーザー プログラム 1 2 1は共有メモリデータ設定手段 1 2 3 2に対し、 P L C 4 bに設定したい生産完了台数データであるデバイス D 0〜D 4 9、 お よび共有メモリ領域 1 2 3 1上の P L C 4 b用デバイスデ一夕設定領域 1 2 3 1 b , 並びに設定デ一夕のユーザ一バッファを指示し、 共有メモ リデ一夕設定手段 1 2 3 2を呼び出す。  Next, in step S304, the user program 1 2 1 sets the shared memory data setting means 1 2 3 in order to set the data of the devices D0 to D49, which are the production completed number data, in the PLC 4b. In contrast to 2, device D0 to D49, which is the number of completed production units to be set in PLC 4b, and device data setting area for PLC 4b on shared memory area 1 2 3 1 1 2 3 1b , And the user's buffer for setting data is indicated, and the shared memory data setting means 1 2 3 2 is called.
ステップ S 3 0 5にて、 共有メモリデ一夕設定手段 1 2 3 2は共有メ モリ領域 1 2 3 1の P L C 4 bに設定したいデバイスデ一夕設定領域 1 2 3 1 bにユーザープログラムから取得した設定デ一夕を格納する。 そして、 ステップ S 3 0 6にて、 プロトコル B用デバイスデータ設定 手段 1 2 3 3 bに対し、 P L C 4 bに設定したいデバイス、 及び P L C 4 bに対する設定データの共有メモリ上の設定領域 1 2 3 1 bを指示し、 プロトコル B用デバイスデ一夕収集手段 1 2 3 3 bを起動させて、 P L C 4 b用デバイスデータ設定領域 1 2 3 1 bに記憶されているデバイス D 0〜D 4 9すなわち製品完了台数データを P L C 4 bに設定させる。 以上で、 P L C 4 bへの製品番号デ一夕であるデバイス D 0〜D 4 9の データ設定が終了する。  In step S305, the shared memory data overnight setting means 1 2 3 2 is obtained from the user program in the device data overnight setting area 1 2 3 1 b to be set in the PLC 4 b of the shared memory area 1 2 3 1. Stores the settings that have been made. Then, in step S306, for the device data setting means for protocol B 1 2 3 3b, the device to be set in the PLC 4b and the setting area 1 2 3 in the shared memory of the setting data for the PLC 4b Instruct 1b to start the device data collection device for protocol B 1 2 3 3b and start the device D 0 to D 4 9 stored in the device data setting area 1 2 3 1 b for PLC 4b. That is, the number of completed products is set in the PLC 4b. Thus, the data setting of the devices D0 to D49, which are the product number data for the PLC 4b, is completed.
また、 P L C 4 cに対して計測値デ一夕であるデバイス R 1 0〜R 2 In addition, devices R 10 to R 2
0のデータを設定するため、 ステップ S 3 0 7において、 ユーザ一プロ グラム 1 2 1は共有メモリデータ設定手段 1 2 32に対し、 PLC 4 c に設定したい計測値デ一夕であるデバイス R 1 0〜R 20、 及び共有メ モリ領域 1 2 3 1上の PLC 4 c用デバイスデ一夕設定領域 1 23 1 c、 並びに設定データのユーザーバッファを指示し、 共有メモリデータ収集 手段 1 232を呼び出す。 In step S307, to set data of 0, The program 1 2 1 1 is sent to the shared memory data setting means 1 2 32 by the devices R 1 0 to R 20 which are the measured value data to be set in the PLC 4 c and the PLC 4 on the shared memory area 1 2 3 1. The device data setting area for c 1 231 1 c and the user buffer for the setting data are specified, and the shared memory data collection means 1 232 is called.
ステップ S 308にて、 共有メモリデータ設定手段 1 232は共有メ モリ領域 1 2 3 1の PLC 4 cに設定したいデバイスデ一夕設定領域 1 23 1 cにユーザープログラムから取得した設定デ一夕を格納する。 そして、 ステップ S 30 9にて、 プロ卜コル C用デバイスデ一夕設定 手段 1 233 cに対し、 P L C 4 cに設定したいデバイス、 及び P LC 4 cに対する設定データの共有メモリ上の設定領域 1 23 1 cを指示し、 プロトコル C用デバイスデ一夕収集手段 1 2 33 cを起動させて、 P L C 4 c用デバイスデータ設定領域 123 1 cに記憶されているデバイス R- 1 0〜R 20すなわち計測値デ一夕を P L C 4 cに設定させる。 以上 で、 P L C 4 cに対する計測値デ一夕であるデバイス R 1 0〜R 20の データ設定が終了する。  In step S308, the shared memory data setting means 1232 stores the setting data obtained from the user program in the device data setting area 1231c to be set in the PLC 4c of the shared memory area 1 2 3 1. Store. Then, in step S309, the device setting unit 1 233c for the protocol C device data sets the device to be set in the PLC 4c and the setting area 1 in the shared memory of the setting data for the PLC 4c. 23 1c is instructed, and the device data collection means 1 2 33c for protocol C is started, and the devices R-10 to R20 stored in the device data setting area 123 1c for PLC 4c Set the measured value to PLC 4c. With the above, the data setting of the devices R10 to R20, which is the measurement value data for the PLC 4c, is completed.
次に、 コントローラ 1 00のデバイスデータ設定手段 1 23 3 a、 1 233 b, 1 233 cの動作を第 9図、 第 1 0図を用いて説明する。 デバイスデ一夕設定手段 1 233 a、 1 233 b、 1233 cは、 そ れぞれプロトコルが異なっているだけであり、 処理手順は同一であるた め、 プロトコル A用デバイスデータ設定手段 1 2 3 3 aを用いて動作を 説明する。  Next, the operation of the device data setting means 1233a, 1233b, and 1233c of the controller 100 will be described with reference to FIGS. 9 and 10. FIG. The device data setting means 1 233 a, 1 233 b, and 1233 c are different from each other only in the protocol, and have the same processing procedure. Therefore, the device data setting means for protocol A 1 2 3 The operation is explained using 3a.
まず、 共有メモリデータ設定手段 1 232により、 PLC 4 aに対し て製品番号データであるデバイス W0〜W 99を設定するため、 製品番 号デ一夕であるデバイス W0〜W99のデータ設定指示を受け、 デバイ スデータ設定手段 1 2 33 aが起動される。 ステップ S 40 1において、 内部に格納されている P L C 4 aとのプ ロトコル Aの通信手順に従って、 通信回線 5 aをオープンする。 First, in order to set devices W0 to W99, which are product number data, to the PLC 4a by the shared memory data setting means 1232, a data setting instruction for devices W0 to W99, which are product number data, is received. The device data setting means 1 233a is activated. In step S401, the communication line 5a is opened in accordance with the protocol A for communication with the PLC 4a stored therein.
次に、 ステップ S 402において、 設定する製品番号データであるデ バイス W0〜W99のデ一夕を共有メモリ 1 2 3 1の PLC 4 a用のデ バイスデータ設定領域 1 2 3 1 aから取得する。  Next, in step S402, the data of the devices W0 to W99, which are the product number data to be set, are obtained from the device data setting area 1 2 3 1a for the PLC 4a in the shared memory 1 2 3 1. .
そして、 ステップ S 403において、 PLC 4 aと通信し、 PL C 4 a のメモリ 40 aに対して製品番号デ一夕であるデバイス W0〜W 99の データ 41 aを設定する。 Then, in step S403, communication is performed with the PLC 4a, and the data 41a of the devices W0 to W99, which are product numbers, are set in the memory 40a of the PLC 4a.
ステップ S 404では、 P L C 4 aとの通信手順に従って、 通信回線 5 aをクローズする。  In step S404, the communication line 5a is closed according to the communication procedure with the PLC 4a.
以上で、 P L C 4 aに対する製品番号データであるデバイス WO〜W 9 9のデータ設定が終了する。 Thus, the data setting of the devices WO to W99, which is the product number data for the PLC 4a, is completed.
本実施例 2によれば、 ユーザーは、 データ設定先の PLC (デバイス データの対象) と、 設定するデータが格納されたユーザーバッファ、 並 びに共有メモリ領域とを指定することにより、 メモリ内部に格納された データ設定手段が起動し、 データ設定の対象 P L Cとの通信プロトコル 及び回線オープン/クローズの設定を自動的に行い、 設定するユーザー バッファのデータを共有メモリに一旦格納した後、 P L Cのに指定され たメモリに設定する。 そのため、 ユーザー自らが、 各通信プロトコルに 対応したユーザープログラムをデータ処理のたびに作成する必要が無く、 通信プロトコルの専門知識を必要とせずに、 プログラムをかんたんに作 成でき、 作業性が向上する。  According to the second embodiment, the user specifies the PLC (device data target) to which the data is to be set, the user buffer in which the data to be set is stored, and the shared memory area to store the data in the memory. The set data setting means is activated, automatically sets the communication protocol with the target PLC for data setting and the line open / close, temporarily stores the user buffer data to be set in the shared memory, and designates it to the PLC. To the specified memory. Therefore, there is no need for the user to create a user program corresponding to each communication protocol each time data is processed, and programs can be easily created without requiring specialized knowledge of communication protocols, improving workability. .
また、 一旦共有メモリに格納するため、 ユーザーの指定した PL Cに 設定する際にも、 共有メモリとユーザーバッファとのデータ授受を考慮 すればよく、 共有メモリデータ設定手段のプログラム処理が簡単な構成 となり、 プログラム処理に要する時間も短縮でき、 データ処理装置 (コ ントローラ) の性能が向上する。 In addition, since the data is temporarily stored in the shared memory, when setting the PLC specified by the user, data exchange between the shared memory and the user buffer can be considered, and the program processing of the shared memory data setting means is simple. And the time required for program processing can be shortened. Controller).
実施例 3 . Example 3.
第 1 1図〜第 1 4図を用いて、 リフレッシュ型データ収集方法に関す るこの発明の実施例 3を説明する。  Third Embodiment A third embodiment of the present invention relating to a refresh type data collection method will be described with reference to FIGS. 11 to 14. FIG.
第 1 1図は、 本発明のリフレッシュ型データ収集装置の構成を示すブ 口ック構成図である。  FIG. 11 is a block diagram showing the configuration of the refresh type data collection device of the present invention.
図において、 1 2 4はメモリ 1 2 0内で動作するリフレツシュ型データ 収集手段であって、 他の実施例 1 、 2と同一符号は、 同一または相当部 分を示している。 In the figure, reference numeral 124 denotes a refresh type data collecting means which operates in the memory 120, and the same reference numerals as those of the other embodiments 1 and 2 indicate the same or corresponding parts.
第 1 2図は、 メモリ 1 2 0内で動作するリフレッシュ型データ収集手 段 1 2 4の機能を示す機能図であり、 図において、 1 2 4 1はメモリ 1 2 0内に設けられた P L C 4 a、 4 b、 4 cの保持しているデバイスデ 一夕が格納されている共有メモリ、 1 2 4 2はメモリ 1 2 0内に設けら れた共有メモリと指定されたユーザーバッファとの間でデバイスデ一夕 の授受を行うデータ授受手段としてのデータ収集手段、 1 2 4 3は P L C 4の通信プロトコルを記憶する通信プロトコル記憶手段を備えたデバ イスデータ処理手段としてのデバイスデータ収集リフレツシュ手段であ り、 1 2 4 3 aはプロトコル八、 例えば R S 2 3 2 cプロ卜コルで接続 された P L C 4 aのデバイスデータ収集リフレッシュ手段、 1 2 4 3 b はプロトコル B、 例えばイーサネットプロトコルで接続された P L C 4 bのデバイスデータ収集リフレツシュ手段、 1 2 4 3 cはプロトコルじ、 例えば独自 L A Nプロトコルで接続された P L C 4 cのデバイスデータ 収集リフレッシュ手段である。  FIG. 12 is a functional diagram showing the function of the refresh type data collection means 124 operating in the memory 120. In the figure, 1241 indicates the PLC provided in the memory 120. 4a, 4b, and 4c are shared memories in which the device data stored in memory are stored. 1 2 4 2 is a shared memory provided in memory 1 20 and a specified user buffer. Data collection means as data exchange means for exchanging device data between devices, and 1243 are device data collection refreshes as device data processing means equipped with communication protocol storage means for storing the communication protocol of PLC 4. 1243a is protocol 8, for example, device data collection and refresh means of PLC 4a connected by RS232c protocol, and 12443b is protocol B, for example, Ethernet protocol. Connected PLC 4 The device data collection / refresh means of b, 1243c is a device data collection / refresh means of a PLC 4c connected by a protocol, for example, a proprietary LAN protocol.
第 1 3図は、 共有メモリデ一夕収集手段 1 2 4 2の動作を示すフロー チャートであり、 ユーザープログラム 1 2 1が共有メモリデ一夕収集手 段 1 2 4 2を呼び出し、 異なる通信回線で接続された P L C 4 a、 4 b、 4 から、 まず、 P L C 4 aの製品番号デ一夕であるデバイス W0〜W 99、 次に P L C 4 bの生産完了台数デ一夕であるデバイス D 0〜D 4 9、 次に P L C 4 cの計測値データであるデバイス R 10〜 20の順に デバイスデータをユーザーしての格納タイミングによりリフレツシュし つつ収集するための、 ユーザープログラム 1 2 1および共有メモリデー 夕収集手段 1 242の動作を示している。 Figure 13 is a flow chart showing the operation of the shared memory data overnight collection means 1 2 4 2, where the user program 1 2 1 calls the shared memory data overnight collection means 1 2 4 2 and connects via different communication lines. PLC 4a, 4b, From 4, first, devices W0 to W 99, which are the product numbers of PLC 4a, then devices D 0 to D 49, which are the number of completed production of PLC 4b, and then PLC 4c The figure shows the operation of a user program 122 and a shared memory data collection means 1242 for collecting device data in the order of measurement data R10 to R20 while refreshing the device data at the user's storage timing.
第 14図は、 デバイスデ一夕収集リフレッシュ手段 1 243が P L C 4からデ一夕を収集するための動作を示すフローチヤ一トであり、 特に プロトコル A用デバイスデータ収集リフレッシュ手段 1 243 aが P L C 4 aから製品番号データであるデバイス WO〜W9 9のデータを収集 するための動作を示している。  FIG. 14 is a flowchart showing the operation of the device data collection / refresh means 1 243 for collecting data from the PLC 4. In particular, the device data collection / refresh means 1 243 a for protocol A is the PLC 4 The figure shows an operation for collecting data of devices WO to W99, which are product number data from a.
次に、 本実施例 3におけるデータ収集装置の動作について説明する。 まず始めに、 第 12図を用いて概略の動作を説明する。  Next, the operation of the data collection device according to the third embodiment will be described. First, a schematic operation will be described with reference to FIG.
ユーザ一は、 収集したいデバイスデ一夕、 すなわちデバイスデ一夕が 格納されている PL C、 及び収集したデバイスデ一夕を格納する収集格 納先ユーザーバッファ、 並びに共有メモリ領域 1 24 1上のデバイスデ 一夕格納領域及びデ一夕リフレッシュのための格納タイミングを指定す る。  The user can read the device data to be collected, that is, the PLC that stores the device data, the collection destination user buffer that stores the collected device data, and the shared memory area 124 1 Specify the device data storage area and storage timing for data refresh.
ユーザ一による P L Cの指定により、 CPU 1 1 0は、 デバイスデ一 夕収集リフレッシュ手段 1 243 a、 1 243 b, 1 243 cに対して、 ユーザ一から指示された P L Cを指示し、 起動をかけさせる。  According to the user's designation of the PLC, the CPU 110 instructs the device data collection / refresh means 1 243 a, 1 243 b, and 1 243 c to the PLC designated by the user and starts up. Let it.
デバイスデータ収集リフレッシュ手段 1 243 a、 1 243 b, 1 2 43 cでは、 内部に記憶されている各通信プロトコルに従い実際に P L C 4 a、 4 b、 4 cと格納タイミングに合わせ通信を行い、 PLC 4 a. 4 b、 4 cからデバイスデータを収集し、 共有メモリ 1 241のデバイ スデ一夕格納領域に格納する。 共有メモリデ一夕収集手段 1 242は、 デバイスデ一夕収集リフレツ シュ手段 1 243 a、 1 243 b, 1 243 cが格納タイミングに合わ せて収集し共有メモリ 1 22 1に格納した P L C 4 a、 4 b、 4 cのデ バイスデータを、 ユーザーが指定した収集格納先ユーザーバッファに格 納する。 The device data collection and refresh means 1 243a, 1 243b, and 1 243c actually communicate with the PLCs 4a, 4b, and 4c in accordance with the communication protocols stored internally, in accordance with the storage timing. 4 a. Device data is collected from 4 b and 4 c and stored in the device storage area of the shared memory 1241. The shared memory data collection means 1242 is composed of the PLC 4a, which the device data collection collection refresh means 1243a, 1243b, and 1243c collect and store in the shared memory 1221, in accordance with the storage timing. 4b and 4c are stored in the user buffer specified by the user.
このようにして、 ユーザ一はデバイスデータを収集したい P L C及び 格納する収集格納先ユーザーバッファ、 並びにデバイスデータ格納領域 及びデ一夕リフレツシュのための格納タイミングを指定することのみに より、 指定した P L Cのデバイスデ一夕をリフレッシュしつつ収集する ことができる。  In this way, the user only needs to specify the PLC from which device data is to be collected, the collection and storage destination user buffer to be stored, and the device data storage area and the storage timing for data refresh. It can be collected while refreshing the device.
次に、 データ処理装置の動作、 すなわち、 PLC4 aから製品番号デ —夕であるデバイス WO〜W99のデータを、 PLC 4 bから生産完了 台数データであるデバイス D 0〜D 49のデータを、 PLC 4 Cから計 測値データであるデバイス R 1 0〜20のデ一夕を収集するための動作 を第 1 3図、 第 5図を用いて詳細に説明する。  Next, the operation of the data processing device, that is, the product number data from the PLC 4a, the data of the devices WO to W99, and the data of the devices D0 to D49, which are the number of completed production units, from the PLC 4b, The operation for collecting the data of the devices R 10 to 20 as the measurement data from 4 C will be described in detail with reference to FIGS. 13 and 5.
まず、 ユーザー自らがメモリにユーザープログラムとして書き込む作 業について説明する。  First, the work of writing the user program into the memory as a user program will be described.
ユーザーは、 収集するデバイスデータが格納された P L Cを指定する と共に、 収集したデバイスデータを格納する収集格納先ユーザーバッフ ァ並びにデバイスデータ格納領域及びデ一夕リフレッシュのための格納 タイミングを指定するュ一ザ一プログラムを作成してメモリ 1 20に書 き込み、 ユーザー自身の処理は終了する。  The user specifies the PLC in which the device data to be collected is stored, and also specifies the collection and storage destination user buffer for storing the collected device data, the device data storage area, and the storage timing for data refresh. The user program is created and written into the memory 120, and the user's own processing ends.
本実施例では、 P LC4 aから製品番号データであるデバイス W0〜 W99のデータを収集して、 収集格納先ユーザーバッファに格納する作 業、 及び P L C 4 bから生産完了台数デ一夕であるデバイス D 0〜D 4 9のデータを収集して、 収集格納先ユーザーバッファに格納する作業、 P L C 4 cから.計測値デ一夕であるデバイス R 1 0〜 2 0のデータを収 集して、 任意の収集格納先ユーザーバッファに格納する作業である。 そのため、 ユーザーは、 デバイスデ一夕が格納された P L Cの指定と収 集格納先ユーザーバッファの指定とを、 3回繰り返すこととなる。 In the present embodiment, the work of collecting the data of the devices W0 to W99, which are the product number data, from the PLC 4a and storing the data in the user buffer of the collection storage destination, and the device of which the number of the completed production from the PLC 4b is Work to collect the data from D0 to D49 and store it in the user buffer for collection and storage; From PLC 4c. This is the task of collecting the data of devices R10 to R20, which are all measured data, and storing them in the user buffer of any collection destination. Therefore, the user has to specify the PLC in which the device data is stored and the user buffer for collection and storage three times.
次に、 ユーザ一により書き込まれたユーザープログラムに基づき動作 するデータ収集装置内部のデータ収集リフレツシュ手段の動作について 説明する。  Next, the operation of the data collection refresh means in the data collection device that operates based on the user program written by the user will be described.
ユーザ一により書き込まれたユーザ一プログラムは、 ステップ S 5 0 1において、 共有メモリデ一夕収集手段 1 2 4 2に対し、 P L C 4 aか ら収集したい製品番号データであるデバイス W O〜W 9 9、 一時的に記 憶する共有メモリ領域 1 2 4 1上の P L C 4 a用デバイスデータ格納領 域 1 2 4 1 a、 及び最終的に格納する収集格納先ユーザーバッファ並び に格納タイミングを指示して、 共有メモリデータ収集手段 1 2 4 2を呼 び出し、 ステップ S 5 0 2に移行する。  In step S501, the user program written by the user sends to the shared memory data collection means 1222 a device WO-W99, which is product number data to be collected from the PLC 4a. The storage timing is specified for the shared memory area for temporary storage 1 2 4 1 on the device data storage area for PLC 4 a 1 2 4 1 a, and the collection and storage destination user buffers to be finally stored. Call the shared memory data collection means 1 2 4 2 and go to step S502.
ステツプ S 5 0 2において、 共有メモリデ一夕収集手段 1 2 4 2は、 コントローラ 1 0 0に接続された P L Cに予め対応して記憶されている 通信プロトコルの中から、 実際に P L C 4 aと通信を行う通信プロトコ ルすなわちプロ卜コル A用デバイスデ一夕収集リフレツシュ手段 1 2 4 3 aを選択し、 そのプロトコル A用デバイスデータ収集リフレツシュ手 段 1 2 4 3 aに対し、 P L C 4 aから収集したいデバイスデ一夕及び P L C 4 aから収集したデバイスデータを一時記憶する共有メモリ上の格 納領域 1 2 4 1 a並びに格納夕イミングを指示し、 プロトコル A用デバ イスデ一夕収集リフレッシュ手段 1 2 4 3 aを起動させて P L C 4 a内 部に格納されているデバイスデータすなわち製品番号データを、 共有メ モリ 1 2 4 1内部に一時記憶させ (プロトコル A用デバイスデータ収集 リフレッシュ手段 1 2 4 3 aの動作については後述する) 、 ステップ S 5 0 3に移行する。 In step S502, the shared memory data collection means 1 242 actually communicates with the PLC 4a from among the communication protocols stored in advance corresponding to the PLC connected to the controller 100. The communication protocol that performs the communication, i.e., device data collection for protocol A, and the refresh means 1 2 4 3a are selected, and the device data collection method for protocol A, refresh method 1 2 4 3a, is collected from the PLC 4a. The storage area on the shared memory that temporarily stores the device data that you want to collect and the device data collected from the PLC 4a 1 2 4 1a and the storage timing are instructed, and the device data for protocol A is collected and refreshed 1 2 Activate 4a to temporarily store the device data stored in the PLC 4a, that is, product number data, in the shared memory 1 2 4 1 (protocol A device data collection It will be described later operation of the threshold means 1 2 4 3 a), step S Move to 503.
ステップ S 5 0 3では、 共有メモリ 1 24 1内部の P LC 4 aデバイ スデ一夕格納領域 1 24 1 aから、 プロトコル A用デバイスデータ収集 リフレッシュ手段 1 243 aが格納した、 製品番号デ一夕であるデバィ ス WO〜W9 9のデ一夕を、 ユーザ一プログラムによりユーザーが指定 した収集格納先ユーザーバッファに格納する。  In step S503, the product number data stored by the protocol A device data collection and refresh means 1 243a is stored from the PLC 4a device data storage area 1 241a inside the shared memory 1241. The device of the evening WO-W99 is stored in the user buffer specified by the user by the user program.
このステップ S 5 0 1からステップ S 5 0 3の動作により、 P L C 4 aからの製品番号データであるデバイス WO〜W9 9のデータを、 ュ一 ザ一が指定した収集格納先ユーザーバッファに格納する一連の作業が終 了する。  By the operation from step S501 to step S503, the data of the devices WO to W99, which is the product number data from the PLC 4a, is stored in the user storage buffer specified by the user 1 A series of work ends.
次に、 P L C 4 bから生産完了台数データであるデバイス D 0〜D 4 9のデ一夕を収集するため、 ステップ S 5 04において、 ユーザープロ グラム 1 2 1は共有メモリデータ収集手段 1 242に対し、 P L C 4 b から収集したい生産完了台数データであるデバイス D 0〜D 49、 およ び共有メモリ領域 1 24 1上の PL C 4 b用デバイスデータ格納領域 1 24 1 bおよび収集格納先ユーザーバッファ並びに格納タイミングを指 示し、 共有メモリデータ収集手段 1 242を呼び出す。  Next, in order to collect data of the devices D0 to D49, which are data of the number of completed production units, from the PLC 4b, in step S504, the user program On the other hand, devices D0 to D49, which are the data on the number of completed production units to be collected from the PLC 4b, and the device data storage area 1 24 1b for the PLC 4 b on the shared memory area 1 24 1 and the collection destination user The buffer and storage timing are instructed, and the shared memory data collection means 1 242 is called.
ステップ S 50 5にて、 共有メモリデータ収集手段 1 242は、 プロ 卜コル B用デバイスデータ収集りフレツシュ手段 1 243 bに対し、 P LC 4 bから収集したいデバイスデ一夕格納領域 1 24 1 bおよび P L C 4 bデバイスデータの共有メモリ上の格納領域 1 2 4 1 b並びに格納 タイミングを指示し、 プロトコル B用デバイスデータ収集リフレッシュ 手段 1 243 bを起動する。  In step S505, the shared memory data collection means 1 242 sets the device data storage area 1 24 1 b to be collected from the PLC 4b in contrast to the protocol B device data collection fresh means 1 243b. And the storage area of the PLC 4b device data on the shared memory 1 2 4 1b and the storage timing are specified, and the device data collection and refresh means 1 243b for protocol B is started.
そして、 ステップ S 5 0 6にて、 ユーザープログラム 1 2 1は共有メ モリ 1 24 1の、 P L C 4 bデバイスデータ格納領域 1 24 1 bから、 プロトコル B用デバイスデータ収集リフレツシュ手段 1 243 bが格納 した、 製品番号データであるデバイス D 0〜D 49のデータを共有メモ リデータ収集手段 1 242を使用してユーザ一プ-ログラム 1 2 1が収集 格納先ユーザーバッファに収集する。 Then, in step S506, the user program 1221 stores the protocol B device data collection and refresh means 1243b from the PLC 4b device data storage area 1241b of the shared memory 1241. Then, the user program 122 collects the data of the devices D0 to D49, which are the product number data, using the shared memory data collection means 1242 in the storage user buffer.
以上で、 P L C 4 bからの製品番号データであるデバイス D 0〜D 49 のデータ収集が終了する。 This completes the data collection of the devices D0 to D49, which are the product number data from the PLC 4b.
また、 PLC 4 cから計測値データであるデバイス R 1 0〜20のデ 一夕を収集するため、 ステップ S 507において、 ユーザープログラム 1 2 1は共有メモリデータ収集手段 1 242に対し、 PLC 4 cから収 集したい計測値デ一夕であるデバイス R 1 0〜20、 および共有メモリ 領域 1 24 1上の PL C 4 C用デバイスデ一夕格納領域 1 24 1 cおよ び収集格納先ユーザーバッファ並びに格納タイミングを指示し、 共有メ モリデータ収集手段 1 242を呼び出す。  Further, in order to collect the data of the devices R 10 to 20 which are the measurement data from the PLC 4 c, in step S 507, the user program 12 1 sends the PLC 4 c Device R10 to 20, which is the measurement data to be collected from the PLC, and the device data storage area for the PLC4C on the shared memory area 1241, and the user buffer for the collection and storage destination In addition, the storage timing is instructed, and the shared memory data collection means 1 242 is called.
ステツプ S 508にて、 共有メモリデータ収集手段 1 242はプロト コル C用デバイスデータ収集リフレツシュ手段 1 243 cに対し、 P L C 4 cから収集したいデバイスデ一夕格納領域 1 22 1 cおよび P L C 4 cデバイスデータの共有メモリ上の格納領域 124 1 c並びに格納夕 イミングを指示し、 プロトコル C用デバイスデ一夕収集リフレッシュ手 段 1 5 cを起動する。  In step S508, the shared memory data collection means 1 242 is compared with the device data collection and refresh means 1 243c for protocol C. Instruct the storage area 124 1c and the storage timing on the data shared memory, and start the device C overnight collection refresh procedure 15c for protocol C.
そして、 ステップ S 509にて、 ユーザープログラム 1 2 1は共有メ モリ 1 24 1の、 P L C 4 cデバイスデータ格納領域 1 24 1 cから、 プロトコル C用デバイスデータ収集リフレッシュ手段 1 243 cが格納 した、 計測値データであるデバイス R 1 0〜20のデータを共有メモリ データ収集手段 1 242を使用してユーザープログラム 1 2 1が収集格 納先ュ一ザ一バッファに収集する。  Then, in step S509, the user program 12 21 stores the protocol C device data collection / refresh means 1 243 c from the PLC 4 c device data storage area 124 1 c of the shared memory 1241, The user program 122 collects the data of the devices R10 to R20, which are the measured value data, into the collection destination user buffer using the shared memory data collection unit 1242.
以上で、 P L C 4 cからの計測値デ一夕であるデバイス R 1 0〜20の データ収集が終了する。 その後、 ステップ S 5 1 0にて再度、 P L C 4 a、 4 b、 4 cのデバ イスデータを収集するかの選択を行い、 連続稼動-を行う場合はステップ S 5 1 1にて共有メモリ 1 24 1から P L C 4 aのデバイスデータを収 集する。 This completes the data collection of the devices R10 to R20, which is the measurement data from the PLC 4c. After that, in step S510, again select whether to collect the device data of PLCs 4a, 4b, and 4c. If continuous operation is to be performed, the shared memory 1 is selected in step S511. 24 Collect device data from 1 to PLC 4a.
同様にステップ S 5 1 2、 5 5 1 3にて? じ 413、 P L C 4 cのデバ イスデ一夕を収集する。 Similarly in steps S 5 1 2 and 5 5 13? J 413, PLC 4c collect device device overnight.
そして、 ステップ S 5 1 4にて処理を終了させる場合は、 ステップ S 5 1 5、 S 5 1 6、 S 5 1 7にて各デバイスデ一夕収集リフレッシュ手 段を停止させる。  If the process is to be terminated in step S515, the device data collection and refresh process is stopped in steps S515, S516 and S517.
終了しなければステップ S 5 1 1に戻り、 再度デバイスデータ収集処 理を行う。  If not, the process returns to step S511 and performs the device data collection process again.
次に、 デバイスデータ収集リフレッシュ手段 1 243の動作を第 5図、 第 1 4図を用いて説明する。  Next, the operation of the device data collection / refresh means 1243 will be described with reference to FIGS.
デバイスデータ収集手段 1 243 a、 1 243 b、 1 243 cは、 そ れぞれプロトコルが異なっているだけであり、 処理手順は同一であるた め、 プロトコル A用デバイスデータ収集リフレツシュ手段 1 24 3 aを 用いて動作を説明する。  The device data collection means 1 243 a, 1 243 b, and 1 243 c are different from each other only in the protocol, and have the same processing procedure. Therefore, the device data collection and refresh means for protocol A 1 243 3 The operation will be described using a.
まず、 共有メモリデータ収集手段 1 242により、 P L C 4 aから製 品番号データであるデバイス WO〜W9 9のデータを収集するため、 製 品番号データであるデバイス WO〜W9 9のデータ収集指示を受け、 デ バイスデ一夕収集リフレッシュ手段 1 243 aが起動される。  First, in order to collect the data of the devices WO to W99, which are the product number data, from the PLC 4a by the shared memory data collecting means 1242, a data collection instruction of the devices WO to W99, which is the product number data, is received. Then, the device refreshing means 1243a is activated.
ステップ S 60 1において、 内部に格納されている P L C 4 aとのプ 口卜コル Aの通信手順に従って、 通信回線 5 aをオープンする。  In step S601, the communication line 5a is opened according to the protocol A for communication with the PLC 4a stored therein.
次に、 ステップ S 6 0 2において、 P LC 4 aと通信し、 PL C 4 a のメモリ 40 aに格納されている製品番号データであるデバイス W0〜 W99のデ一夕 4 1 aを収集する。 そして、 ステップ S 6 0 3において、 収集した製品番号デ一夕であるデ バイス W O〜W 9 9のデ一夕を、 所定の共有メモリ 1 2 4 1の P L C 4 a用のデバイスデ一夕格納領域 1 2 4 1 aに格納する。 (第 5図参照) ステップ S 6 0 4では、 ユーザー指定の格納タイミングがくるまで処 理は待ちとなる。 Next, in step S602, the device communicates with the PLC 4a and collects data 41a of devices W0 to W99, which are product number data stored in the memory 40a of the PLC 4a. . Then, in step S603, the data of the devices WO to W99, which are the collected product number data, are stored in the predetermined shared memory 1221, device data for the PLC 4a. Store in area 1 2 4 1 a. (See Fig. 5) In step S604, the process waits until the storage timing specified by the user comes.
ステップ S 6 0 5にて、 ユーザ一プログラム 1 2 1から共有メモリデ 一夕収集手段 1 2 4 2を通じて終了要求があった場合は、 ステップ S 6 0 6の P L C 4 aとの通信手順に従って、 通信回線 5 aをクロ一ズする。 終了要求がない場合は、 再度ステップ S 6 0 2から繰り返す。  In step S 605, if there is an end request from the user 1 program 1 2 1 through the shared memory data collection means 1 2 4 2, communication is performed according to the communication procedure with the PLC 4 a in step S 6 06. Close line 5a. If there is no end request, the process is repeated from step S602 again.
以上で、 P L C 4 aからの製品番号デ一夕であるデバイス W 0〜W 9 9 の連続データ収集が終了する。 Thus, the continuous data collection of the devices W0 to W99, which is the product number data from the PLC 4a, is completed.
本実施例 3によれば、 上述した実施例 1の効果に加え、 毎回各々のプ 口トコルで接続されている P L Cにアクセスしなくとも、 ユーザ一指定 のタイミングにてリフレッシュされている共有メモリ領域 1 2 4 1 a、 1 2 4 1 b , 1 2 4 1 cを読むことにより、 常に最新のデバイスデータ を収集できる。  According to the third embodiment, in addition to the effect of the first embodiment, the shared memory area refreshed at the timing designated by the user without accessing the PLC connected by each protocol every time. By reading 1 2 4 1 a, 1 2 4 1 b and 1 2 4 1 c, the latest device data can always be collected.
また、 通信時間のオーバ一ヘッドが少なくなり、 性能がより向上する。 実施例 4 .  In addition, the overhead of communication time is reduced, and the performance is further improved. Example 4.
第 1 5図〜第 1 8図を用いて、 リフレッシュ型データ設定方法に関す るこの発明の実施例 4を説明する。  Embodiment 4 of the present invention relating to a refresh type data setting method will be described with reference to FIGS. 15 to 18. FIG.
第 1 5図は、 本発明のリフレッシュ型データ設定装置の構成を示すブ ロック構成図である。  FIG. 15 is a block diagram showing the configuration of the refresh type data setting device of the present invention.
図において、 1 2 5はメモリ 1 2 0内で動作するリフレツシュ型データ 設定手段であって、 他の実施例 1、 2と同一符号は、 同一または相当部 分を示している。  In the figure, reference numeral 125 denotes a refresh type data setting means which operates in the memory 120, and the same reference numerals as those in the other embodiments 1 and 2 indicate the same or corresponding parts.
第 1 6図は、 第 1 5図のメモリ 1 2 0内で動作するリフレツシュ型デ —夕設定手段 1 2 5の機能を示す機能図であり、 図において、 1 25 1 はメモリ 1 20内に設けられた P L C 4 a、 4 b; 4 cの保持している デバイスデ一夕が格納されている共有メモリ、 1 2 52はメモリ 1 20 内に設けられた共有メモリと指定されたユーザーバッファとの間でデバ イスデータの授受を行うデータ授受手段としての共有メモリデータ設定 手段、 1 253は PLC 4の通信プロトコルを記憶する通信プロトコル 記憶手段を備えたデバイスデータ処理手段としてのデバイスデータ設定 リフレッシュ手段であり、 1 2 53 aはプロトコル八、 例えば RS 23 2 cプロ卜コルで接続された P L C 4 aのデバイスデータ設定リフレツ シュ手段、 1 253 bはプロトコル B、 例えばイーサネッ トプロトコル で接続された PLC 4 bのデバイスデ一夕設定リフレッシュ手段、 1 2 53 cはプロトコル〇、 例えば独自 LANプロトコルで接続された P L C 4 cのデバイスデータ設定リフレツシュ手段である。 FIG. 16 shows a refresh type data memory operating in the memory 120 of FIG. —Function diagram showing the function of the evening setting means 1 25, where 1 25 1 is the device data stored in the PLCs 4a, 4b; 4c provided in the memory 120. The stored shared memory, 1 2 52, is a shared memory data setting means as a data transfer means for transferring device data between the shared memory provided in the memory 1 20 and a designated user buffer, 1 253 is a device data setting refresh device as a device data processing device having a communication protocol storage device for storing the communication protocol of the PLC 4, and 1 253a is connected by a protocol 8, for example, an RS 232c protocol. PLC 4a device data setting refresh means, 1253b is protocol B, for example, PLC 4b device data overnight setting refresh means connected by Ethernet protocol, and 1253c is professional Col 〇 a device data set Rifuretsushu means connected PLC 4 c for example a proprietary LAN protocol.
第 1 7図は、 共有メモリデータ設定手段 1252の動作を示すフロー チャートであり、 ユーザープログラム 1 2 1が共有メモリデ一夕設定手 段 12 52を呼び出し、 異なる通信回線で接続された P L C 4 a、 4 b、 4じから、 まず、 P L C 4 aの製品番号データであるデバイス W0〜W 99、 次に PLC 4 bの生産完了台数データであるデバイス D 0〜D 4 9、 次に P L C 4 cの計測値データであるデバイス R 1 0〜 20の順に デバイスデータをユーザー指定の格納タイミングによりリフレツシュし つつ設定するための、 ユーザープログラム 1 2 1および共有メモリデ一 夕収集手段 1 252の動作を示している。  FIG. 17 is a flowchart showing the operation of the shared memory data setting means 1252.The user program 1 2 1 calls the shared memory data setting method 1 2 52, and the PLCs 4a, From 4b and 4th, first, the devices W0 to W99 which are the product number data of the PLC 4a, the devices D0 to D49 which are the data of the number of completed production of the PLC 4b, and then the PLC 4c The operation of the user program 12 1 and the shared memory data collection means 1 252 for setting the device data while refreshing it at the user-specified storage timing in the order of the device R 10 to 20 which is the measured value data is shown. .
第 1 8図は、 デバイスデータ設定リフレッシュ手段 1 253力 P L C 4にデータを設定するための動作を示すフローチャートであり、 特に プロトコル A用デバイスデータ設定リフレツシュ手段 1 253 aが P L C 4 aに製品番号データであるデバイス WO〜W 99のデ一夕を設定す るための動作を示している。 FIG. 18 is a flowchart showing an operation for setting data to the device data setting refresh means 1 253 PLC 4. In particular, the device data setting refresh means 1 253 a for protocol A stores the product number data in the PLC 4 a. Is a device WO-W 99 The operation for the operation is shown.
次に、 本実施例 4におけるデータ設定装置の動作について説明する。 まず始めに、 第 1 6図を用いて概略の動作を説明する。  Next, the operation of the data setting device according to the fourth embodiment will be described. First, a schematic operation will be described with reference to FIG.
ユーザーは、 デバイスデータを設定するデバイス、 すなわち対象とな る PLC 4、 及び P L C 4に設定するためのデバイスデータが格納され ているユーザーバッファ、 並びに共有メモリ 1 2 5 1上のデバイスデ一 夕設定領域及びデバイスデ一夕設定領域 1 2 5 1 a、 1 25 1 b、 1 2 5 1 cからデータ設定のリフレツシュのための格納タイミングを指定す る。  The user can set the device data to be set, that is, the target PLC 4, the user buffer that stores the device data to be set in the PLC 4, and the device data setting on the shared memory 1251 Specify the storage timing for refreshing the data setting from the area and device data setting area 1251a, 1251b, and 1251c.
ユーザ一プログラム 12 1から呼ばれる、 共有メモリデ一夕設定手段 Shared memory data overnight setting means called from user program 12 1
1 2 52は、 P L C 4に設定するためのデバイスデータを、 共有メモリ 12 5 1に格納し、 デバイスデータ設定リフレッシュ手段 1 2 53 a、 1 253 b, 1 25 3 cに起動をかける。 1252 stores the device data to be set in the PLC 4 in the shared memory 1251, and activates the device data setting refresh means 1253a, 1253b, and 1253c.
起動されたデバイスデ一夕設定リフレッシュ手段 1 2 53 a、 1 253 b、 1 253 cでは、 格納タイミングに合わせ、 共有メモリ 1 22 1力、 らデバイスデ一夕を取得し、 内部に記憶されている各通信プロトコルに 従い実際に PLC 4 a、 4 b、 4 cと通信を行い、 PLC 4 a、 4 b、The activated device data setting refresh means 1 253 a, 1 253 b, and 1 253 c acquire the device data from the shared memory 122 1 in accordance with the storage timing and store it internally. Actually communicates with the PLCs 4a, 4b, and 4c according to each communication protocol.
4 cに対してデバイスデータを設定する。 4 Set the device data for c.
このようにして、 ユーザ一はデバイスデ一夕を設定したい P L C及び 設定するためのデバイスデータが格納されたユーザーバッファ、 並びに デバイスデ一夕設定領域及び格納タイミングを指定することのみにより、 指定した P L Cへのデバイスデ一夕をリフレッシュしつつ設定すること ができる。  In this way, the user can specify the PLC to set the device data and the user buffer in which the device data to be set is stored, and specify the device data setting area and storage timing only by specifying the specified PLC. It can be set while refreshing the device data.
次に、 データ処理装置の動作、 すなわち、 PLC 4 aに製品番号デ一 夕であるデバイス WO〜W99のデ一夕を、 PLC 4 bに生産完了台数 デ一夕であるデバイス D 0〜D 49のデータを、 P L C 4 cに計測値デ 一夕であるデバイス R 1 0〜2 0のデータを設定するための動作を第 5 図、 第 1 7図を用いて詳細に説明する。 - まず、 ユーザ一自らメモリにユーザ一プログラムとして書き込む作業 について説明する。 Next, the operation of the data processing device, that is, the device WO to W99, which is the product number data, is stored in the PLC 4a, and the device D0 to D49, which is the data whose production number is completed, is stored in the PLC 4b. Data from PLC 4c The operation for setting the data of the devices R 10 to R 20, which is one night, will be described in detail with reference to FIGS. 5 and 17. -First, the work of writing as a user program into the memory by the user himself will be described.
ユーザーは、 P L Cに設定したいデバイス、 及び設定するデバイスデ 一夕が格納されたユーザーバッファ、 並びに共有メモリ領域 1 2 5 1上 の P L C 4 a用デバイスデータ設定領域 1 2 5 1 a及び格納タイミング を指定するユーザープログラムを作成してメモリ 1 2 0に書き込み、 ュ 一ザ一自身の処理は終了する。  The user specifies the device to be set in the PLC, the user buffer storing the device data to be set, the device data setting area for PLC 4a in the shared memory area 1251, and the storage timing. The user program to be designated is created and written to the memory 120, and the processing of the user itself ends.
本実施例では、 ユーザーバッファに格納されているデバイスデータを、 In this embodiment, the device data stored in the user buffer is
P L C 4 aに製品番号データとしてデバィス W O〜W 9 9を設定する作 業、 及びユーザーバッファに格納されているデバイスデータを、 P L C 4 bに生産完了台数デ一夕としてデバイス D 0〜D 4 9を設定する作業、 エーザ—バッファに格納されているデバイスデータを、 P L C 4 cに計 測値データであるデバイス R 1 0〜2 0を設定する作業である。 Work to set devices WO to W99 as product number data in PLC 4a, and device data stored in the user buffer to PLC 4b as devices D0 to D49 This is the task of setting the device data stored in the Ezer buffer to the devices R10 to R20, which are the measurement data, in the PLC 4c.
次に、 ユーザーにより書き込まれたユーザープログラムに基づき動作 するデータ処理装置内部のデ一夕設定リフレッシュ手段の動作について 説明する。  Next, the operation of the data setting refresh means in the data processing device that operates based on the user program written by the user will be described.
ユーザ—一により書き込まれたユーザ一プログラムは、 ステップ S 7 0 1において、 共有メモリデ一夕設定手段 1 2 5 2に対し、 P L C 4 a に対して設定したい製品番号データであるデバイス W 0〜W 9 9、 一時 的に記憶する共有メモリ領域 1 2 5 1上の P L C 4 a用デバイスデータ 設定領域 1 2 5 1 a、 並びに設定データのユーザーバッファ及び格納夕 ィミングを指示して、 共有メモリデータ設定手段 1 2 5 2を呼び出し、 ステップ S 7 0 2に移行する。  In step S701, the user program written by the user 1 is sent to the shared memory data setting means 1 2 52 by the device W0 to W, which is the product number data to be set in the PLC 4a. 9 9, Temporary shared memory area 1 2 5 1 Device data setting area for PLC 4a on 1 25 1 Instruct user buffer for setting data and set storage data, and set shared memory data The means 1 2 5 2 is called, and the process proceeds to step S702.
ステップ S 7 0 2において、 共有メモリデ一夕設定手段 1 2 5 2は、 ユーザープログラムに基づき、 共有メモリ 1 2 5 1上の P L C 4 a用デ バイスデータ設定領域 1 2 5 1 aに PL C 4 aに設定したいデバイスデ —夕をユーザーバッファから格納してステップ S 703に移行する。 ステップ S 703では、 共有メモリデ一夕設定手段 1 2 52は、 プロ トコル A用デバイスデータ設定リフレッシュ手段 1 2 53 aに対し、 P L C 4 aに設定したいデバイス、 及び P L C 4 aに対する設定デ一夕の 共有メモリ上の設定領域 1 2 5 1 aを指示し、 プロトコル A用デバイス データ設定手段 1 2 53 aを起動させて、 共有メモリ 1 2 3 1上の P L C 4 a用デバイスデ一夕設定領域 1 2 5 1 aに記憶されているデバイス W0〜W 9 9すなわち製品番号データを、 P LC 4 aに設定させ、 (プ 口トコル A用デバイスデ一夕設定リフレツシュ手段 1 2 5 3 aの動作に ついては後述する) ステップ S 704に移行する。 In step S702, the shared memory data setting means 1 2 5 2 Based on the user program, store the device data to be set in PLC 4a in the device data setting area 12501a for PLC 4a on the shared memory 1251 in the user buffer and go to step S703. Transition. In step S703, the shared memory data setting means 1 252 sends the device data setting refresh means 1 253a for the protocol A to the device to be set in the PLC 4a and the setting data setting for the PLC 4a. Specify the setting area 1 2 5 1 a on the shared memory, start the device data setting means 1 2 53 a for protocol A, and set the device data setting area 1 for the PLC 4 a on the shared memory 1 2 3 1 1 The device W0 to W99 stored in the device 25a, that is, the product number data, is set in the PLC 4a, and the device data for the protocol A is set to refresh. The process proceeds to step S704.
このステップ S 70 1からステップ S 703の動作により、 PLC 4 aに製品番号デ一夕であるデバィス WO〜W 99のデ一夕を設定する一 連の作業が終了する。  By the operations of steps S701 to S703, a series of operations for setting the device WO-W99, which is the product number, in the PLC 4a is completed.
次に、 P L C 4 bに対して生産完了台数データであるデバイス D 0〜 D 49のデータを設定するため、 ステップ S 7 04において、 ユーザ一 プログラム 1 2 1は共有メモリデータ設定手段 1 252に対し、 PLC 4 bに設定したい生産完了台数データであるデバイス D 0〜D49、 お よび共有メモリ領域 1 25 1上の P L C 4 b用デバイスデータ設定領域 1 25 1 b, 並びに設定データのユーザーバッファ及び格納タイミング を指示し、 共有メモリデータ設定手段 1 2 52を呼び出す。  Next, in order to set the data of the devices D0 to D49, which are the number of completed production units, in the PLC 4b, in step S704, the user program 1 2 1 sends the data to the shared memory data setting means 1 252. , Devices D0 to D49, which are the number of completed production units to be set in the PLC 4b, and the device data setting area 1 25 1 b for the PLC 4 b on the shared memory area 1 25 1, and the user buffer and storage of the setting data Specify the timing, and call the shared memory data setting means 1 2 52.
ステップ S 70 5にて、 共有メモリデータ設定手段 1 2 52は共有メ モリ領域 1 2 5 1の PLC 4 bに設定したいデバイスデータ設定領域 1 2 5 1 bにユーザープログラムから取得した設定データを格納する。 そして、 ステップ S 706にて、 プロ卜コル B用デバイスデータ設定 リフレツシュ手段 1 253 bに対し、 P L C 4 bに設定したいデバイス、 及び PLC 4 bに対する設定デ一夕の共有メモリ-上の設定領域 1 2 5 1 bを指示し、 プロトコル B用デバイスデータ収集リフレッシュ手段 1 2 53 bを起動させて、 P L C 4 b用デバイスデータ設定領域 1 2 5 1 b に記憶されているデバイス D 0〜D 49すなわち製品完了台数データを P L C 4 bに設定させる。 In step S705, the shared memory data setting means 1 52 stores the setting data obtained from the user program in the device data setting area 1 2 5 1 b to be set in the PLC 4 b of the shared memory area 1 2 5 1. I do. Then, in step S706, device data setting for protocol B For the refresh means 1 253 b, the device to be set to the PLC 4 b and the setting area 1 2 5 1 b on the shared memory of the setting data for the PLC 4 b are indicated, and the device data collection and refresh means for protocol B Activate 1 2 53 b and set the devices D 0 to D 49 stored in the device data setting area 1 2 5 1 b for PLC 4 b, that is, the number of completed products, in the PLC 4 b.
以上で、 P L C 4 bへの製品番号デ一夕であるデバイス D 0〜D 49の データ設定が終了する。 Thus, the data setting of the devices D0 to D49, which are the product number data for the PLC 4b, is completed.
また、 P L C 4 cに対して計測値データであるデバイス R 1 0〜R 2 0のデータを設定するため、 ステップ S 707において、 ユーザ一プロ グラム 1 2 1は共有メモリデータ設定手段 1 2 52に対し、 PLC 4 c に設定したい計測値データであるデバイス R 1 0〜R 20、 及び共有メ モリ領域 1 25 1上の P L C 4 c用デバイスデ一夕設定領域 1 25 1 c、 並びに設定デ一夕のユーザ一バッファ及び格納タイミングを指示し、 共 有メモリデータ収集手段 1 252を呼び出す。  Further, in order to set the data of the devices R10 to R20, which are the measurement value data, to the PLC 4c, in step S707, the user program 1211 sends the shared memory data setting means 1 On the other hand, the device R10 to R20, which is the measured value data to be set in the PLC 4c, and the PLC 4c device data on the shared memory area 1251, the setting area 1251c, and the setting data Instruct the user's buffer and storage timing in the evening, and call the shared memory data collection means 1252.
ステップ S 708にて、 共有メモリデータ設定手段 1 252は共有メ モリ領域 1 25 1の PLC4 Cに設定したいデバイスデ一夕設定領域 1 25 1 cにユーザ一プログラムから取得した設定デ一タを格納する。 そして、 ステップ S 709にて、 プロトコル C用デバイスデ一夕設定 リフレッシュ手段 1 2 53 cに対し、 P L C 4 cに設定したいデバイス、 及び P L C 4 cに対する設定デ一夕の共有メモリ上の設定領域 1 2 5 1 cを指示し、 プロトコル C用デバイスデータ収集リフレッシュ手段 1 2 53 cを起動させて、 PLC4 c用デバイスデータ設定領域 125 1 c に記憶されているデバイス R 1 0〜R 20すなわち計測値データを P L C 4 cに設定させる。  In step S708, the shared memory data setting means 1252 stores the setting data obtained from the user program in the device data setting area 1251c to be set in the PLC4C of the shared memory area 1251. I do. Then, in step S 709, the device data to be set in the PLC 4 c and the setting area 1 in the shared memory of the device to be set in the PLC 4 c and the setting data 1 2 5 1c is instructed, and the device data collection and refresh means for protocol C 1 2 53 c is activated, and the devices R 10 to R 20 stored in the device data setting area 125 1 c for PLC 4 c, that is, the measured values Set the data to PLC 4c.
以上で、 P L C 4 cに対する計測値データであるデバイス R 1 0〜R 2 0のデ一夕設定が終了する。 With the above, the devices R10 to R2 which are the measurement value data for the PLC 4c The default setting of 0 ends.
その後、 ステップ S 7 1 0にて再度、 P LC 4 a、 4 b、 4 cにデバ イスデータを設定するかの選択を行い、 連続稼動を行う場合はステップ S 7 1 1にて共有メモリ 1 2 5 1から PL C4 aのデバイスデ一夕を予 め設定されたタイミングによりリフレッシュ設定する。  After that, in step S710, again select whether to set the device data in PLCs 4a, 4b, and 4c. If continuous operation is to be performed, the shared memory 1 is set in step S711. 2 5 From 1 to 1, refresh the device at PLC4a at the preset timing.
同様にステップ S 7 1 2、 S 7 1 3にて PLC4 b、 P L C 4 cのデバ イスデータを設定する。 Similarly, set the device data of PLC4b and PLC4c in steps S712 and S713.
そして、 ステップ S 7 14にて、 リフレッシュ設定処理を終了させる 場合はステップ S 7 1 6、 S 7 1 7、 S 7 1 8にて各デバイスデ一夕設 定リフレッシュ手段を停止させる。  If the refresh setting processing is to be terminated in step S714, the device data setting refresh means is stopped in steps S716, S717, and S718.
終了でなければ、 ステップ S 7 1 1に戻り、 再度デバイスデータ設定 処理を行う。  If not, the process returns to step S711 and performs the device data setting process again.
次に、 コントローラ 1のデバイスデ一夕設定リフレッシュ手段 1 2 5 3 a、 1 2 53 b、 1 2 5 3 cの動作を第 1 6図、 第 1 8図を用いて説 明する。  Next, the operation of the device 1 overnight setting refresh means 1 253 a, 1 253 b and 1 253 c of the controller 1 will be described with reference to FIGS. 16 and 18. FIG.
デバイスデータ設定リフレッシュ手段 1 2 53 a、 1 2 53 b 1 2 53 cは、 それぞれプロトコルが異なっているだけであり、 処理手順は 同一であるため、 プロトコル A用デバイス設定リフレツシュ手段 1 25 3 aを用いて動作を説明する。  Since the device data setting refresh means 1 2 53 a and 1 2 53 b 1 2 53 c are different from each other only in the protocol and the processing procedure is the same, the device A setting refresh means 1 25 3 a for protocol A is used. The operation will be described with reference to FIG.
まず、 共有メモリデータ設定手段 1 252から、 PLC 4 aに対して 製品番号デ一夕であるデバイス W0〜W 99のデータを設定するため、 製品番号デ一夕であるデバイス W0〜W 99のデ一夕設定指示を受け、 デバイスデータ設定リフレッシュ手段 1 6 aが起動される。  First, from the shared memory data setting means 1 252, the data of the devices W0 to W99, which are the product numbers, are set in the PLC 4a in order to set the data of the devices W0 to W99, which are the product numbers. Upon receiving the setting instruction overnight, the device data setting refresh means 16a is activated.
ステップ S 80 1において、 内部に格納されている P L C 4 aとのプ ロトコル Aの通信手順に従って、 通信回線 5 aをオープンする。  In step S801, the communication line 5a is opened according to the protocol A for communication with the PLC 4a stored therein.
次に、 ステップ S 802において、 設定する製品番号データであるデ バイス WO〜W 99のデータを共有メモリ 1 25 1の P L C 4 a用のデ バイスデ一夕設定領域 1 2 5 1 aから取得する。 - そして、 ステップ S 803において、 P L C 4 aと通信し、 PLC 4 a のメモリ 40 aに対して製品番号デ一夕である W0〜W 9 9のデ一夕 4 1 aを設定する。 Next, in step S802, the data which is the product number data to be set is set. The data of the devices WO to W99 is acquired from the device memory setting area 1 2 5 1 a for the PLC 4 a of the shared memory 125 1. -Then, in step S803, communication is performed with the PLC 4a, and the data 40a of the product numbers W0 to W99 are set in the memory 40a of the PLC 4a.
次にステップ S 804において、 ユーザ一指定の格納タイミングがく るまで処理待ちとなる。  Next, in step S804, the process waits until the storage timing designated by the user comes.
ステップ S 805にてユーザープログラム 40 dから共有メモリデー 夕設定手段 1 2 52を通じて終了要求があった場合は、 ステップ S 80 6に移行し、 P L C a 4との通信手順に従って、 通信回線 5 aをクロ一 ズする。  If there is an end request from the user program 40d in step S805 through the shared memory data setting means 1 2 52, the process proceeds to step S806, and the communication line 5a is closed according to the communication procedure with the PLC a4. Read.
一方、 終了要求がない場合は、 再度ステップ S 802からリフレッシュ 設定を繰り返す。 On the other hand, if there is no termination request, the refresh setting is repeated from step S802.
以上で、 PLC 4 aに対する製品番号デ一夕であるデバイス WO〜W 9 9のデータ設定が終了する。 This completes the data setting of the devices WO to W99, which is the product number data for the PLC 4a.
本実施例 4によれば、 ユーザ一は、 データ設定先の P L Cと、 設定す るデータが格納されたユーザ一バッファ、 並びに共有メモリ領域及び格 納タイミングとを指定することにより、 メモリ内部に格納されたデータ 設定手段が起動し、 デ一夕設定の対象 P L Cとの通信プロ卜コル及び回 線オープンノクローズの設定を自動的に行い、 設定するユーザーバッフ ァのデ一夕を共有メモリに一旦格納した後、 P L Cのに指定されたメモ リにリフレツシュ設定する。  According to the fourth embodiment, the user can store the data in the memory by specifying the PLC to which the data is to be set, the user buffer in which the data to be set is stored, and the shared memory area and the storage timing. The set data setting means is started, the communication protocol with the target PLC for setting the data and the setting of line open / close are automatically performed, and the data of the user buffer to be set is temporarily stored in the shared memory. After storing, refresh settings are made to the memory specified in the PLC.
そのため、 ユーザ一自らが、 各通信プロトコルに対応したユーザープロ グラムをデータ処理のたびに作成する必要が無く、 通信プロトコルの専 門知識を必要とせずに、 プログラムをかんたんに作成でき、 作業性が向 上する。 また、 一旦共有メモリに格納するため、 ユーザ一の指定した P Lじに 設定する際にも、 共有メモリデータ設定手段のプログラム処理が簡単な 構成となり、 プログラム処理に要する時間も短縮でき、 プログラマブル コントローラの性能が向上する。 Therefore, there is no need for the user himself to create a user program corresponding to each communication protocol every time data processing is performed, and the user can easily create a program without requiring specialized knowledge of the communication protocol, thereby improving workability. improves. In addition, since the data is temporarily stored in the shared memory, the program processing of the shared memory data setting means has a simple configuration even when setting to the PL specified by the user, and the time required for the program processing can be shortened. Performance is improved.
さらに、 毎回各々のプロトコルで接続されている P L Cにアクセスし なくとも、 ュ一ザ一指定のタイミングにてリフレッシュされている共有 メモリ領域 1 2 5 1 a、 1 2 5 1 b, 1 2 5 1 cを読むことにより、 常 に最新のデバイスデ一夕設定できる。  Furthermore, the shared memory area that is refreshed at the timing specified by the user without accessing the PLC connected with each protocol every time 1 2 5 1 a, 1 2 5 1 b, 1 2 5 1 By reading c, the latest device data can always be set.
また、 通信時間のオーバ一ヘッドが少なくなり、 性能がより向上する。 実施例 5.  In addition, the overhead of communication time is reduced, and the performance is further improved. Example 5.
第 1 9図〜第 2 2図を用いて、 データ収集方法に関するこの発明の一 実施例を説明する。  An embodiment of the present invention relating to a data collection method will be described with reference to FIGS. 19 to 22.
第 1 9図は、 本発明のデータ収集装置の構成を示すブロック図である。 図において、 6は設定デ一夕ファイル 6 1 (第 2 2図参照) を保存する 補助記憶装置、 1 2 6はメモリ 1 2 0内で動作するデータ収集手段、 1 5 1は補助記憶装置 6とのィン夕フェースである補助記憶装置用 I ZF であって、 他の実施例と同一符号は、 同一または相当部分を示している。 第 2 0図は、 メモリ 1 2 0内で動作するデータ収集手段 1 2 6の機能 を示す機能図であり、 図において、 1 2 6 1はメモリ 1 2 0内に設けら れた P L C 4 a、 4 b、 4 cの保持しているデバイスデータが格納され ている共有メモリ、 1 2 6 2はメモリ 1 2 0内に設けられた共有メモリ と指定されたユーザーバッファとの間でデバイスデータの授受を行うデ 一夕授受手段としての共有メモリデ一夕収集手段、 1 2 6 3は P L C 4 の通信プロトコルを記憶する通信プロトコル記憶手段を備えたデバイス データ処理手段としてのデバイスデータ収集手段であり、 1 2 6 3 aは プロトコル八、 例えば R S 2 3 2 cプロトコルで接続された P L C 4 a のデバイスデータ収集手段、 1 2 4 3 bはプロトコル B、 例えばイーサ ネットプロトコルで接続された P L C 4 bのデバイスデ一夕収集手段、 1 2 4 3 cはプロトコル 、 例えば独自 L A Nプロトコルで接続された P L C 4 cのデバイスデータ収集手段である。 FIG. 19 is a block diagram showing the configuration of the data collection device of the present invention. In the figure, 6 is an auxiliary storage device for storing a setting data file 6 1 (see FIG. 22), 1 26 is a data collection means operating in the memory 120, and 15 1 is an auxiliary storage device 6 In the IZF for an auxiliary storage device which is an interface with the above, the same reference numerals as those of the other embodiments indicate the same or corresponding parts. FIG. 20 is a functional diagram showing the functions of the data collection means 126 operating in the memory 120. In the figure, reference numeral 125 denotes a PLC 4a provided in the memory 120. , 4b, 4c, a shared memory in which the device data held is stored. 1262 is a device memory between the shared memory provided in the memory 120 and a designated user buffer. A shared memory data collection means as a means for sending and receiving data, and a device data collection means as a device data processing means provided with a communication protocol storage means for storing a communication protocol of the PLC 4. 1 2 6 3 a is a protocol 8, for example a PLC 4 a connected with the RS 2 3 2 c protocol Device data collection means, 1 2 4 3b is protocol B, e.g. PLC 4b connected by Ethernet protocol Device data collection means, 1 2 3 4c is protocol, e.g. connected by proprietary LAN protocol This is the device data collection means of the PLC 4c.
第 2 1図は、 プロトコル A用デバイスデ一夕収集手段 1 2 6 3 a、 プ 口トコル B用デバイスデータ収集手段 1 2 6 3 b、 プロトコル C用デバ イスデータ収集手段 1 2 6 3 cの動作を示すフローチヤ一トであり、 第 2 2図は、 P L Cデバイスデータを収集する間隔を設定したデ一夕 を保存するための補助記憶装置 6内のデータべ一ス形式のファイル (以 下、 設定データファイルと称す) を示した図である。  Fig. 21 shows the device data collection means for protocol A 1 2 6 3a, the device data collection means for protocol B 1 2 6 3b, and the device data collection means for protocol C 1 2 6 3c. FIG. 22 is a flowchart showing the operation, and FIG. 22 is a database format file in the auxiliary storage device 6 for storing data in which an interval for collecting PLC device data is set (hereinafter, referred to as FIG. 2 is a diagram showing a setting data file).
次に、 本実施例 5におけるデータ収集装置の動作について説明する。 まず、 第 1 9図、 第 2 0図を用いて概略の動作を説明する。  Next, the operation of the data collection device according to the fifth embodiment will be described. First, the schematic operation will be described with reference to FIGS. 19 and 20.
ユーザーがキ一ポード 3より 「P L Cデバイスデータ収集プロトコル 名」 と 「P L Cデバイスデータ収集間隔」 を入力して、 このデータを補 助記憶装置 6内の設定データファイル 6 1 (第 2 2図参照) へ保存する。 次に、 プロトコル A用デバイスデータ収集手段 1 2 6 3 a、 プロトコル B用デバイスデ一夕収集手段 1 2 6 3 b、 プロトコル C用デバイスデ一 夕収集手段 1 2 6 3 cが、 補助記憶装置 6内の設定デ一夕ファイル 6 1 を参照して、 P L C 4が保有する P L Cデバイスデ一夕を共有メモリ 1 2 6 1に格納する。  The user inputs “PLC device data collection protocol name” and “PLC device data collection interval” from keypad 3 and stores this data in the setting data file 6 1 in the auxiliary storage device 6 (see Fig. 22). Save to Next, the device data collection means for protocol A 1 2 6 3 a, the device data collection means for protocol B 1 2 6 3 b, and the device data collection means for protocol C 1 2 6 3 c Referring to the setting data file 6 1 in 6, the PLC device data stored in the PLC 4 is stored in the shared memory 1 2 6 1.
このようにして、 ユーザ一は P L Cからのデバイスデ一夕の収集の夕 イミングを、 ユーザ一プログラムによる設定ではなく、 補助記憶装置に データベース形式の設定デ—夕として設定し、 この設定デ一夕ファイル を使用して各種プロトコル用デバイスデータ収集手段が、 設定間隔毎に P L Cデバイスデータを共有メモリに格納することができる。  In this way, the user sets the collection of the device data from the PLC in the form of a database format setting data in the auxiliary storage device instead of the setting by the user program. Using the file, the device data collection means for various protocols can store the PLC device data in the shared memory at set intervals.
次に、 コントローラ 1のプロトコル A用デバイスデータ収集手段 1 2 6 3 a > プロトコル B用デバイスデータ収集手段 1 2 6 3 b、 プロトコ ル C用デバイスデ一夕収集手段 1 2 6 3 cの動作-を、 第 1 9図〜第 2 2 図を使用して説明する。 Next, device data collection means for protocol A of controller 1 1 2 6 3 a> The operation of the device data collection means for protocol B 1 2 6 3 b and the device data collection means for protocol C 1 2 6 3 c-using Fig. 19 to Fig. 22 explain.
第 2 1図に示すフローチヤ一トにおいて、 共有メモリデータ収集手段 1 2 6 2により、 メモリ 1 2 0上に展開されたプロトコル A用デバイス デ一夕収集手段 1 2 6 3 a、 プロトコル B用デバイスデータ収集手段 1 2 6 3 b , プロ卜コル C用デバイスデ一夕収集手段 1 2 6 3 cが起動さ れると、 ステップ S 9 0 1において、 補助記憶装置 6内の設定デ一タフ アイル 6 1の P L Cデバイスデータ収集プロトコル名を参照してプロト コルに対応した P L Cデバイスデ一夕収集間隔を読込む。  In the flowchart shown in FIG. 21, the shared memory data collection means 1 262 uses the protocol A device developed on the memory 120 and the data collection means 1 263 a, the protocol B device. When the data collection means 1 2 6 3 b and the protocol C device data collection means 1 2 6 3 c are activated, in step S 901, the setting data file 6 in the auxiliary storage device 6 is read. Read the PLC device data collection interval corresponding to the protocol by referring to the PLC device data collection protocol name in 1.
そして、 ステップ S 9 0 2では、 ユーザーにより設定された P L Cデバ イスデ一夕収集間隔分待ち、 ステップ S 9 0 3に移行し、 各プロトコル に対応させて P L C 4から P L Cデバイスデータを共有メモリ 1 2 2 1 に格納して、 ステップ S 9 0 2へ戻る。 Then, in step S902, the process waits for the PLC device data collection interval set by the user for one night, shifts to step S903, and stores the PLC device data from the PLC 4 in the shared memory 12 according to each protocol. Stored in 2 1 and return to step S902.
本実施例 5によれば、 ユーザーがユーザ一プログラムとして、 P L C からデバイスデータを収集する間隔を記載する必要が無く、 収集間隔を 各収集プロトコル毎にパラメ一夕として設定しているので、 仮に収集間 隔の変更の際にも、 ユーザープログラム全体を変更することなく、 パラ メータとして設定された部分のみの変更により容易に、 デバイスデータ 収集の設定を変更することができ、 プログラミングの作業性が向上する。 実施例 6 .  According to the fifth embodiment, there is no need for the user to describe the interval for collecting device data from the PLC as a user program, and the collection interval is set as a parameter for each collection protocol. Even when changing the interval, the device data collection settings can be easily changed by changing only the parameters set as parameters without changing the entire user program, improving programming workability. I do. Embodiment 6.
第 2 3図〜第 2 9図を用いて、 デ一夕収集方法に関するこの発明の一 実施例を説明する。  An embodiment of the present invention relating to a data collection method will be described with reference to FIGS. 23 to 29.
第 2 3図は、 本発明のデータ収集装置のシステム構成を示すシステム 構成図である。  FIG. 23 is a system configuration diagram showing the system configuration of the data collection device of the present invention.
図において、 1 0 0、 1 0 1、 1 0 2は同一か、 同等のコントローラで あり、 共有メモリおよびリフレツシュ型デ一夕収集手段を兼ね備えてい る。 - また、 各コン卜口一ラ 1 0 0 、 1 0 1 、 1 0 2は、 第 2の通信回線であ る通信回線 5 eにより同一プロトコル E例えばイーサネットプロトコル で接続されている。 In the figure, 100, 100, and 102 are the same or equivalent controllers. Yes, it has both shared memory and refresh type data collection means. -Also, the controllers 100, 101, and 102 are connected by the same protocol E, for example, the Ethernet protocol, by the communication line 5e, which is the second communication line.
なお、 コントローラ 1 0 0には第 1の通信回線である通信回線 5 aを介 して P L C 4 aが、 コントローラ 1 0 1には第 1の通信回線である通信 回線 5 dを介して P L C 5 dが、 コントロ一ラ 1 0 2には第 1の通信回 線である通信回線 4 f を介して P L C 4 f が、 それぞれ異なるプロトコ ルにより接続されている。 The controller 100 has a PLC 4a via a communication line 5a which is a first communication line, and the controller 101 has a PLC 5a via a communication line 5d which is a first communication line. d is connected to the controller 102 via a communication line 4 f which is a first communication line, and a PLC 4 f is connected to the controller 102 by different protocols.
第 2 4図は、 メモリ内で動作するデータ _収集手段の機能を示す機能図 であり、 図において、 1 2 1は共有メモリ 1 2 7 1に統一された通信手 順でアクセスするユーザープログラム、 1 2 7はメモリ 1 2 0内で動作 するリフレッシュ型デ一夕収集手段、 1 4 2はプロトコル E用 I Z Fで あって、 通信回線 5 eを介して同一通信プロトコルによりコントローラ 1 0 1 、 1 0 2とを接続している。  FIG. 24 is a functional diagram showing the function of data collection means operating in the memory. In the figure, reference numeral 121 denotes a user program that accesses the shared memory 1271 by a unified communication procedure, Reference numeral 127 denotes a refresh type data collection means operating in the memory 120, and reference numeral 142 denotes an IZF for the protocol E. The controllers 101, 100 are provided by the same communication protocol via the communication line 5e. 2 and connected.
また、 リフレッシュ型デ一夕収集手段 1 2 7において、 1 2 7 1は P L C 4 aの保持しているデバイスデ一夕及びコントロ一ラ 1 0 1が送信 しコントローラ 1 0 0が受信して格納した P L C 4 dの保持しているデ バイスデータ並びにコントローラ 1 0 2が送信しコントロ一ラ 1 0 0が 受信して格納した P L C 4 eの保持しているデバイスデータが格納され ている共有メモリ、 1 2 7 2はメモリ 1 2 0内に設けられた共有メモリ 1 2 7 1と指定されたユーザ一バッファとの間でデバイスデータの授受 を行うデータ授受手段としての共有メモリデータ収集手段、 1 2 7 3 a はプロトコル A、 例えば R S 2 3 2 cプロトコルで接続された P L C 4 aの通信プロトコルを記憶する通信プロトコル記憶手段を備えたデバイ スデ一夕処理手段としてのデバイスデータ収集リフレッシュ手段、 1 2 74は自コントローラ 1 0 0の共有メモリ 1 2 7-1上のデバイスデータ を他コントローラ 1 0 1、 1 0 2へ書き込み要求を送信する書込み要求 送信手段、 1 2 7 5は他コントローラ 1 0 1、 1 0 2からの書き込み要 求を受信し、 共有メモリ 1 2 7 1に書き込む書込み手段、 1 2 7 6はデ バイスリフレッシュパラメ一夕格納エリア 1 2 7 1 d内に格納されてい るデバイスリフレッシュパラメ一夕に従って、 書込み要求送信手段 1 2 74を一定間隔で起動する一定間隔起動手段である。 Also, in the refresh type overnight collection means 1 27, 127 1 is transmitted by the device data and controller 101 held by the PLC 4a, and received and stored by the controller 100. A shared memory that stores the device data held by the PLC 4d and the device data held by the PLC 4e sent by the controller 102 and received and stored by the controller 100. 1 2 7 2 is a shared memory data collection means as a data exchange means for exchanging device data between the shared memory 1 2 7 1 provided in the memory 1 20 and a designated user buffer, 1 2 73a is a device provided with communication protocol storage means for storing the communication protocol of the PLC 4a connected by the protocol A, for example, the RS232c protocol. Device data collection and refresh means as speed-up processing means. 1 2 74 sends a write request for device data on shared memory 1 27-1 of own controller 100 to other controllers 101 and 102. The writing means that sends the write request from the other controller 101 and 102, and the writing means that writes to the shared memory 1271, and the device refresh parameter 127 This is a constant interval activation means for activating the write request transmission means 1 274 at regular intervals in accordance with the device refresh parameters stored in the evening storage area 127 1 d.
1 2 7 1 dは共有メモリ 1 2 7 1内のデバィスリフレッシュパラメ一 夕格納エリアであり、 自コントローラ 1 0 0の共有メモリ 1 2 7 1上の デバイスデ一夕を、 他コントローラ 1 0 1、 1 0 2へ送信、 あるいは他 コントローラ 1 0 1、 1 0 2から書き込み要求送信されたデバイスデー 夕を共有メモリ 1 2 7 1上のデバイスデータエリアに格納するための範 囲であるリフレッシュ範囲、 及び自コントローラ 1 0 0の共有メモリ 1 2 7 1上のデバイスデ一夕を他コントローラ 1 0 1、 1 0 2へ送信する 間隔時間からなるデバイスリフレッシュパラメ一夕が格納されている。 第 2 5図は、 ユーザ一により共有メモリ上に設定されたデバイスリフ レッシュパラメ一夕の内容を示した図であり、 図において、 2 0はデバ イスリフレッシュパラメ一夕の本体であり、 コントローラ 1 0 0、 1 0 1、 1 0 2でそれぞれ、 ユーザ一プログラムにて統一された通信手順に より共有メモリ 1 2 7 1に書き込まれる。  1 2 7 1 d is a device refresh parameter storage area in the shared memory 1 2 7 1, which stores the device data on the shared memory 1 2 7 1 of the own controller 1 0 1 and the other controller 1 0 Refresh range, which is a range for storing device data sent to 1, 102 or other device 101, a write request from controller 102, to the device data area on shared memory 1271, , And a device refresh parameter consisting of an interval time for transmitting the device data on the shared memory 127 1 of the own controller 100 to the other controllers 101 and 102 is stored. FIG. 25 is a diagram showing the contents of the device refresh parameters set on the shared memory by the user 1. In the figure, reference numeral 20 denotes the main body of the device refresh parameters, and The data is written to the shared memory 1271 by the communication procedure unified by the user program at 0, 101, and 102, respectively.
2 1はコント口一ラ 1 0 0、 1 0 1、 1 0 2間での、 それぞれの共有メ モリ上のデバイスデータのリフレッシュを行う間隔、 2 2はコント口一 ラ 1 0 0から他コントローラ 1 0 1、 1 0 2へ転送するデバイスデ一夕 の範囲であり、 例えば、 W0〜W9 9と D 0〜D 9 9のデ一夕を他のコ ントローラ 1 0 1、 1 0 2へそれぞれ転送する設定となっている。 同様に 2 3は、 コントローラ 1 0 1から他のコントローラ 1 00、 1 0 2へ転送するデバイスデータの範囲であり、 例えば、 W200〜W29 9と D 1 00〜D 1 99のデ一夕を他のコントローラ 1 00、 1 02へ それぞれ転送する設定となっている。 2 1 is the interval for refreshing device data on each shared memory between controllers 100, 101, and 102.22 is the interval from controller 100 to other controllers. This is the range of device data to be transferred to 101 and 102.For example, the data of W0 to W99 and D0 to D99 are transferred to other controllers 101 and 102, respectively. It is set to transfer. Similarly, 23 is the range of device data to be transferred from the controller 101 to the other controllers 100 and 102, for example, W200 to W299 and D100 to D199 Are set to be transferred to the controllers 100 and 102, respectively.
同様に 24は、 コントローラ 1 02から他のコントローラ 1 00、 1 0 1へ転送するデバイスデータの範囲、 例えば、 0200〜13299と1 0〜R 99のデータを、 他のコントロ一ラ 100、 10 1へそれぞれ転 送する設定となっている。 Similarly, 24 is a range of device data to be transferred from the controller 102 to the other controllers 100, 101, for example, the data of 0200 to 13299 and the data of 10 to R99 are transferred to the other controllers 100, 10 1 It is set to transfer to each.
第 2 6図は、 他のコントローラへ転送するデバイス書き込み要求送信 デ一夕内容の一例を示した図であり、 図に示されるように、 デバイス書 込み要求送信データは、 リフレッシュパラメ一夕の 1つのコントローラ に割り付けられた設定個数 25、 リフレツシュパラメ一夕の設定 1に記 述されたデバイスの種類 26、 リフレッシュパラメ一夕の設定 1に記述 されたデバイスの先頭番号 27、 リフレツシュパラメ一夕の設定 1に記 述されたデバイスの転送バイ ト数 28、 リフレッシュパラメ一夕の設定 1に記述された転送するデバイスデータ 2 9から構成されている。 第 27図は、 リフレッシュパラメ一夕に従って、 一定間隔で自コント ローラデバイスデ一夕において、 他のコントローラへの書き込み要求送 信手段を起動する手段の動作を示すフローチャートである。  FIG. 26 is a diagram showing an example of the contents of a device write request transmission data to be transferred to another controller. As shown in the figure, the device write request transmission data is one of the refresh parameters. Number of settings assigned to one controller 25, Device type 26 described in Refresh parameter setting 1, Device start number 27 described in Refresh parameter setting 1, Refresh parameter setting 1 It consists of 28 transfer bytes of the device described in the setting 1 of the setting, and device data 29 to be transferred described in the setting 1 of the refresh parameter. FIG. 27 is a flowchart showing the operation of the means for activating the means for transmitting a write request to another controller in the own controller device at regular intervals in accordance with the refresh parameter.
第 28図は、 リフレッシュパラメ一夕に従って、 一定間隔で自コント ローラデバイスデータにおいて、 他のコントロ一ラへの書き込み要求送 信手段の動作を示すフローチヤ一トである。  FIG. 28 is a flow chart showing the operation of the means for transmitting a write request to another controller in the own controller device data at regular intervals according to the refresh parameter.
第 29図は、 他コントローラからの書き込み要求を受信し、 共有メモ リに書き込む手段の動作を示すフローチャートである。  FIG. 29 is a flowchart showing an operation of a means for receiving a write request from another controller and writing the same in the shared memory.
次に、 本実施例 6における動作について説明する。  Next, the operation in the sixth embodiment will be described.
まず、 第 24図を用いて概略の動作を説明する。 ユーザ一により設定されたリフレッシュパラメ一夕に従って、 一定間 隔で自コントローラデバイスデータを他のコント-ローラへの書き込み要 求手段を起動する一定間隔起動手段 1 2 7 6は、 共有メモリ上のデバィ スリフレツシュパラメ一夕格納エリァ 1 2 7 1 dからリフレツシュパラ メータ 2 0を読み出す。 First, the schematic operation will be described with reference to FIG. In accordance with the refresh parameters set by the user, the fixed interval starting means for starting the means for requesting the writing of the own controller device data to another controller at fixed intervals is started by the device on the shared memory. Read the refresh parameter 20 from the refresh parameter storage area 1 2 7 1 d.
そして、 一定間隔起動手段 1 2 7 6は、 リフレッシュパラメ一夕 2 0 の中のリフレッシュ間隔 2 1に従って、 自コントローラデバイスデータ を他のコントローラへの書き込み要求送信手段 1 2 7 4を起動させる。 書込み要求送信手段 1 2 7 4は、 共有メモリ 1 2 7 1上のデバィスリ フレツシュパラメ一夕格納エリァ 1 2 7 1 dからリフレッシュパラメ一 夕 2 0を読み出す。  Then, the constant interval starting means 127 6 starts the own controller device data writing request sending means 122 7 4 to another controller in accordance with the refresh interval 21 in the refresh parameter 20. The write request transmitting means 1274 reads the refresh parameter 20 from the device refresh parameter storage area 1271d on the shared memory 1271.
そして、 自コントローラの他コントローラへの書き込み要求を出すデバ イス範囲 2 2に従って、 共有メモリ 1 2 7 1上のデバイスデータを読み 出し、 他のコントロ一ラ 1 0 1、 1 0 2へデバイスデータ書き込み要求 するため、 プロトコル E用 I Z F 1 4 2を介して他のコントローラへデ 一夕を送信する。 Then, according to the device range 22 for issuing a write request to another controller of the own controller, the device data on the shared memory 127 1 is read, and the device data is written to the other controllers 101 and 102. Sends a request to another controller via protocol IZF142 for request.
プロトコル E用 I Z F 1 4 2を介して他のコントローラからデバイス データ書き込み要求を受信すると、 書込み手段 1 2 7 5が起動し、 受信 データを共有メモリ 1 2 7 1に書き込む。  When a device data write request is received from another controller via the IZF 14 2 for protocol E, the writing means 1 27 5 starts and writes the received data to the shared memory 1 27 1.
次に、 コントローラ 1 0 0のリフレッシュパラメ一夕に従って、 一定 間隔起動手段 1 2 7 6の動作を、 第 2 6図、 第 2 7図を用いて詳細に説 明する。  Next, the operation of the fixed interval starting means 127 6 will be described in detail with reference to FIGS. 26 and 27 in accordance with the refresh parameters of the controller 100.
まず、 自コントローラデバイスデ一夕の他コントロ一ラへの書き込み 要求送信手段 1 2 7 4を一定間隔で起動するためのユーザー設定時間を 読み出すため、 ステップ S 1 0 0 1において、 共有メモリ 1 2 7 1上の デバイスリフレッシュパラメータ格納エリア 1 2 7 1 dのリフレッシュ パラメ一夕 2 0を検索し、 デバイスリフレツシュ間隔 2 1を読み出す。 次に、 ステップ S 1 0 0 2にて、 共有メモリ 1 -2 7 1上デバイスリフ レッシュパラメ一夕格納エリア 1 2 7 1 dのリフレッシュパラメ一夕 2 0を検索し、 自コントローラ 1 0 0用の設定デ一夕 2 2を取り出す。 その後、 ステップ S 1 0 0 3にて、 自コントローラ 1 0 0用設定デー 夕 2 2に基づき、 設定個数 2 5、 デバイス種類 2 6、 デバイス先頭 N o 2 7、 転送バイ ト数 2 8を取り出し、 第 2 6図に示されるようなフォー マツ卜の形式にならべて、 他のコントローラへの書き込み要求送信デー 夕を作成する。 First, in order to read out the user setting time for starting the write request transmitting means 1 274 at a certain interval, the shared memory 1 2 7 1 Device refresh parameter storage area on 1 1 2 7 1 d Refresh Search for the parameter 20 and read the device refresh interval 21. Next, in step S 1002, the device refresh parameter storage area 1 2 7 1 d on the shared memory 1-27 1 is searched for the refresh parameter storage 20, and the controller 100 is used for its own controller 100. Take out 2 2 Then, in step S1003, based on the setting data 22 for the own controller 100, the setting number 25, device type 26, device head No 27, and transfer byte number 28 are extracted. In accordance with the format shown in FIG. 26, data for sending a write request to another controller is created.
次に、 ステップ S 1 0 0 4にて、 他のコントローラへの書き込み要求 送信データを指示し、 書き込み要求送信手段 1 2 7 4を起動させる。 その後、 ステップ S 1 0 0 5にて、 次に書き込み要求送信手段 1 2 7 4を起動するまで、 リフレツシュパラメ一夕から読み出したデバイスり フ—レッシュ間隔 2 1の時間だけ自ルーチンの処理を行い、 実行待ち状態 にする。  Next, in step S104, a write request transmission data to another controller is instructed, and the write request transmission means 1274 is activated. After that, in step S1005, until the next time the write request transmission means 1274 is activated, the processing of the own routine is performed for the time of the device refresh interval 21 read from the refresh parameter. And wait for execution.
そして、 共有メモリ上デバイスリフレッシュパラメ一夕格納エリア 1 2 7 1 dのリフレッシュパラメ一夕 2 0は、 ユーザープログラム 1 2 1に より変更されることがあるため、 再度ステップ S 1 0 0 1の処理から繰 り返し実行する。 Since the device refresh parameter storage area 1 2 7 1 d on the shared memory 1 2 7 1 d may be changed by the user program 12 1, the processing in step S 10 01 again is performed. Execute repeatedly from.
以上のようなフローチャートに基づき、 自コントローラデバイスデ一 夕の他のコントロ一ラへの書き込み要求送信手段 1 2 7 4をユーザー指 定のリフレッシュ間隔で定期的に起動する。  Based on the above flowchart, the means for transmitting a write request to the other controller in the own controller device server is started periodically at a user-specified refresh interval.
次に、 他のコントローラに対して、 自コントローラデバイスデータの 書き込み要求を送信するため、 書込み要求送信手段 1 2 7 4の動作につ いて、 第 2 8図のフローチャートを用いて説明する。  Next, the operation of the write request transmitting means 1274 for transmitting a write request of its own controller device data to another controller will be described with reference to the flowchart of FIG.
ステップ S 1 1 0 1において、 一定間隔起動手段 1 2 7 6により指示 された他のコントローラへの書き込み要求送信デ一夕を検索して、 共有 メモリ 1 2 7 1からデバイスデータを読み出し、 他コントローラへの書 き込み要求送信デ一夕のデバイスデータ 2 9にセットし、 送信データを 完成させる。 In step S111, instructed by the fixed interval starting means 1 276 The device data is read from the shared memory 1 2 7 1 and the device data 2 9 of the write request transmission data to the other controller is set. Complete the transmission data.
そして、 ステップ S 1 1 0 2において、 共有メモリ 1 2 7 1上のデバ イスリフレッシュパラメータ格納エリア 1 2 7 1 dのリフレッシュパラ メータ 2 0を検索し、 他のコントロ一ラ 1 0 1 、 1 0 2におけるコント ローラ番号 2 3 、 2 4を読み出し、 送信データをどのコントローラに送 信するかを確定する。  Then, in step S1102, the refresh parameter 20 of the device refresh parameter storage area 1271d on the shared memory 1271 is searched, and the other controllers 101, 10 are searched. Read the controller numbers 2 3 and 24 in 2 and determine to which controller the transmission data is to be transmitted.
次に、 ステップ S 1 1 0 3において、 他のコント口一ラに対して作成 した送信データを転送するため、 コントローラ間で同一プロトコルであ るプロトコル Eの通信回線 5 eをオープンする。  Next, in step S113, a communication line 5e of the protocol E, which is the same protocol, is opened between the controllers in order to transfer the created transmission data to another controller.
次に、 ステップ S 1 1 0 4において、 他のコントローラ 1 0 1 、 1 0 2のコントローラ番号 2 3 、 2 4に対して、 完成した書き込み要求送信 デ一夕を送信する。  Next, in step S1104, the completed write request transmission data is transmitted to the controller numbers 23 and 24 of the other controllers 101 and 102.
書込み要求送信データの送信を終了すると、 ステップ S 1 1 0 5にお いて、 コントローラ間で同一プロトコルであるプロトコル Eの通信回線 5 eをクローズする。  When the transmission of the write request transmission data is completed, in step S1105, the communication line 5e of the protocol E which is the same protocol between the controllers is closed.
以上で、 自コントローラデバイスデ一夕から他のコントローラへの書き 込み要求送信が終了する。 As described above, the transmission of the write request from the own controller device to the other controller is completed.
次に、 他のコントロ一ラからのデバイスデ一夕書き込み要求受信デー 夕を、 自コントローラ 1 0 0の共有メモリ 1 2 7 1上に書き込むため、 書き込み手段 1 2 7 5の動作について、 第 2 9図のフローチャートを用 いて説明する。  Next, in order to write the device data write request reception data from the other controller to the shared memory 1271 of the own controller 100, the operation of the writing means 1275 This will be described with reference to the flowchart of FIG.
ステップステップ S 1 2 0 1において、 他のコントローラからのデバ イスデータ書き込み要求受信データを検索し、 設定個数 2 7を取り出す。 次に、 ステップ S 1 2 0 2において、 他コントローラからのデバイス デ一夕書き込み要求受信データを検索し、 デバイス種類 2 6、 デバイス 先頭 N o 2 7から、 自コントローラ 1 0 0の共有メモリ 1 2 7 1上のデ バイスの書き込み先を確定し、 受信データ中のデバイスデータ 2 9を転 送バイ ト数分、 確定した共有メモリ 1 2 7 1上のデバイスへ書き込む。 次に、 ステップ S 1 2 0 3において、 設定個数分のデバイスデータを 共有メモリ 1 2 7 1に書き込んだかどうか判断し、 設定個数分すベて書 き込んでいれば終了であり、 設定個数分すベて書き込んでいなければ、 ステップ S 1 2 0 2に戻り、 上述したの処理を行う。 In step S 1 201, device data write request reception data from another controller is searched, and the set number 27 is extracted. Next, in step S122, the device data overnight write request reception data from the other controller is searched, and from the device type 26, the device start No. 27, the shared memory 12 of the own controller 100 is searched. 7 Determine the write destination of the device on 1 and write the device data 29 in the received data to the determined device on the shared memory 127 1 for the number of transfer bytes. Next, in step S123, it is determined whether or not the set number of device data has been written to the shared memory 1271, and if all of the set number have been written, the processing is completed. If all data has not been written, the process returns to step S122 and performs the above-described processing.
以上で、 他のコントローラからのデバイスデータ書き込み要求受信デー 夕の自コントローラ 1 0 0の共有メモリ 1 2 7 1上への書き込みが終了 する。 Thus, the writing of the device data write request reception data from the other controller to the shared memory 1271 of the own controller 100 is completed.
本実施例 6によれば、 上述した実施例 3の効果に加え、 同一プロトコ ル上に接続されたコントローラ間で、 容易にデータの受け渡しを行うこ とができる。  According to the sixth embodiment, in addition to the effects of the third embodiment, data can be easily exchanged between controllers connected on the same protocol.
実施例 7 . Embodiment 7.
第 3 0図〜第 3 3図を用いて、 リフレッシュパラメ一夕データ設定方 法に関するこの発明の実施例を説明する。  An embodiment of the present invention relating to a method for setting refresh parameter overnight data will be described with reference to FIGS. 30 to 33. FIG.
なお、 他の実施例と同一符号は、 同一または相当部分を示している。 第 3 0図は、 本発明のメモリ内で動作するリフレッシュパラメ一夕デ 一夕設定手段の機能を示す機能図であり、 図において、 1 2 1は共有メ モリ 1 2 8 1に統一された通信手段でアクセスするユーザ一プログラム であり、 その内部にデバイスリフレツシュパラメ一夕デ一夕を共有メモ リ上に設定するユーザ一プログラム 1 2 1 1を有している。 The same reference numerals as those of the other embodiments indicate the same or corresponding parts. FIG. 30 is a functional diagram showing the function of the refresh parameter overnight setting means operating in the memory of the present invention. In the figure, reference numeral 121 denotes unified shared memory 1281. It is a user program accessed by communication means, and has a user program 1 2 1 1 for setting device refresh parameters on a shared memory.
1 2 8はメモリ 1 2 0内で動作するデ一夕収集手段、 1 2 8 1はデータ 収集手段 1 2 8内に設けられた P L C 4の保持しているデバイスデ一夕 が格納されている共有メモリ、 1 2 8 1 eは共有メモリ内に設定された デバイスリフレッシュパラメ一夕デ一夕が格納される格納エリァ、 1 2 8 2は共有メモリと指定されたュ一ザ一バッファとの間でデバイスデー 夕の授受を行うデ一夕授受手段としての共有メモリデータ収集手段、 1 2 8 3はデバイスリフレツシュパラメ一夕格納ェリア 1 2 8 1 e内に格 納されているデバイスリフレッシュパラメ一夕データを第 2の通信回線 を介して他のコントローラ 1 0 1、 1 0 2へ転送するデバイスリフレツ シュパラメ一夕データ転送手段 (以下、 転送手段) 、 1 2 8 4は他のコ ントローラから送信されてくるデータの種類を判断し、 デバイスデ一夕 であるならば共有メモリ 1 2 8 1上のデバイスデータ格納領域に送信さ れてきたデ一夕を書込み、 デバイスリフレッシュパラメータデ一夕であ るならばデバイスリフレツシュパラメ一夕格納エリァ 1 2 8 1 eに送信 されてきたデータを書込む書き込み手段である。 1 28 is the data collection means operating in the memory 120, and 128 1 is the data collection device stored in the PLC 4 provided in the data collection means 128. 1 2 8 1 e is a storage area where device refresh parameters set in the shared memory are stored, and 1 2 8 2 is a user specified as shared memory. Shared memory data collection means as a means for sending and receiving device data to and from one buffer, and 1 283 is stored in the device refresh parameter storage area 1 281 e. Device refresh parameter data transfer means (hereinafter, transfer means) for transferring the device refresh parameter data to another controller 101, 102 via the second communication line. Judgment of the type of data transmitted from another controller, and if it is device data, write the transmitted data to the device data storage area on the shared memory 1281, and refresh the device. It is a writing means for writing the data transmitted to the device refresh storage area 1281 e if it is a parameter refresh.
第 3 1図は転送手段 1 2 8 3の動作を示すフローチャート、 第 3 2図 は書き込み手段 1 2 8 4の動作を示すフローチャート、 第 3 3図はデバ イスリフレツシュパラメ一夕デ一夕を共有メモリ上に設定するユーザー プログラムの動作を示すフローチヤ一トである。  FIG. 31 is a flowchart showing the operation of the transfer means 1283, FIG. 32 is a flowchart showing the operation of the writing means 1284, and FIG. 33 is a flowchart showing the device refresh operation. 5 is a flowchart showing the operation of a user program set on a shared memory.
次に、 動作について説明する。  Next, the operation will be described.
まず、 第 3 0図を用いて概略の動作を説明する。  First, a schematic operation will be described with reference to FIG.
ユーザープログラム 1 2 1 1に基づき、 共有メモリ上のデバイスリフレ ッシュパラメ一夕格納ェリア 1 2 8 1 eにデバイスリフレッシュパラメ —夕データを設定し、 デバイスリフレッシュパラメ一夕デ一夕を他のコ ントローラに転送する転送手段 1 2 8 3を起動する。  Based on the user program 1 2 1 1, the device refresh parameters stored in the shared memory 1 2 8 1 e Device refresh parameters are set in the e-data, and the device refresh parameters are set to the other controller. Start the transfer method 1 2 8 3 to transfer.
転送手段 1 2 8 3では、 共有メモリ上のデバイスリフレッシュパラメ一 タ格納エリァ 1 2 8 1 eからデバイスリフレツシュパラメ一夕データを 読み出し、 予め転送手段 1 2 8 3内部に格納されている通信プロトコル に基づき他のコントローラに転送する。 The transfer means 1 283 3 reads the device refresh parameter data from the device refresh parameter storage area 1 281 e on the shared memory, and stores the communication protocol stored in advance in the transfer means 1 283. Is transferred to another controller based on.
書き込み手段 1 2 8 4では、 他のコン卜ローラかちのデ一夕を受信する と、 その受信したデータがデバイスデータかデバイスリフレツシュパラ メータデ—夕かを判別して、 デバイスデ一夕の場合に自コントローラの 共有メモリ 1 2 8 1のデバイスデータ格納領域に書き込み、 デバイスリ フレッシュパラメ一夕データの場合に自コントローラの共有メモリ上デ バイスリフレツシュパラメ一夕格納エリァ 1 2 8 1 eに書き込む。 The writing means 1 284 4 determines whether the received data is device data or device refresh parameter data when the data received from another controller is received. Write to the device data storage area of the shared memory of the own controller in the local controller, and write it to the device refresh area of the device in the controller's shared memory in the case of the device refresh parameter data. .
次に、 デバイスリフレッシュパラメ一夕データを他のコントローラに 転送する転送手段 1 2 8 3の動作を第 3 1図のフローチャートを用いて 説明する。  Next, the operation of the transfer means 1283 for transferring the device refresh parameter data to another controller will be described with reference to the flowchart of FIG.
ユーザープログラムとして、 デバイスリフレッシュパラメータデ一夕が 格納されているユーザ一バッファ及び共有メモリ上のデバィスリフレツ シュパラメ一夕格納エリアを指定することにより、 共有メモリデータ収 集手段 1 2 8 2に基づき、 該ユーザーバッファからデバイスリフレツシ ュパラメ一夕格納エリァ 1 2 8 1 eにデバイスリフレッシュパラメ一夕 データが設定される。 By designating a user buffer in which device refresh parameters are stored and a device refresh storage area in the shared memory as a user program, the user can be designated based on the shared memory data collection means 1 282. Device refresh parameter overnight data is set from the buffer to the device refresh parameter overnight storage area 1 2 8 1 e.
そして、 ステップ S 1 3 0 1において、 リフレッシュパラメ一夕格納ェ リア 1 2 8 1 eに格納されているデバイスリフレッシュパラメ一夕デ一 夕を読み込む。 Then, in step S1301, the device refresh parameter storage area stored in the refresh parameter storage area 1281e is read.
次にステップ S 1 3 0 2において、 内部に記憶されている通信プロトコ ルを読み出し、 その通信プロトコルに従い通信回線をオープンし、 デバ イスリフレッシュパラメ一夕デ一夕を同一プロトコルで接続された他の コントロ一ラに転送する。  Next, in step S1302, the communication protocol stored inside is read out, the communication line is opened according to the communication protocol, and the device refresh parameter is connected to another device connected by the same protocol. Transfer to controller.
上述のように、 転送手段を設けたことにより、 ユーザ一プログラムに よりデバイスリフレツシュパラメ一夕データが格納されたユーザ一バッ ファ及び共有メモリ上のデバイスリフレッシュパラメ一夕格納エリア 1 2 8 1 eを指定することにより、 コントローラ 1 0 0に設定するデバイ スリフレツシュパラメ一夕データを他のコント口一ラ 1 0 1 、 1 0 2に も同様に設定することができる。 As described above, by providing the transfer means, the user buffer storing the device refresh parameter data by the user program and the device refresh parameter storage area 1 on the shared memory 1 By specifying 281 e, the device refresh data set in the controller 100 can be set in the other controllers 101 and 102 in the same manner.
次に、 他のコン卜ローラからのデ一夕を共有メモリ上に書き込む書き 込み手段 1 2 8 4の動作を第 3 2図のフローチヤ一トを用いて説明する。 ステップ S 1 4 0 1において、 同一プロトコルで接続された他のコン トローラから自コントロ一ラへのデ一夕を受信する。  Next, the operation of the writing means 1284 for writing data from another controller to the shared memory will be described with reference to the flowchart of FIG. In step S1401, a data transmission to the own controller is received from another controller connected by the same protocol.
次にステップ S 1 4 0 2において、 受信したデータがデバイスデ一夕 かデバイスリフレツシュパラメ一夕デ一夕かを判別する。  Next, in step S1402, it is determined whether the received data is device data overnight or device refreshing data overnight.
ステップ S 1 4 0 2において、 データがデバイスリフレッシュパラメ 一夕データの場合にステップ S 1 4 0 3に移行し、 自コントローラの共 有メモリ上デバイスリフレッシュパラメ一夕格納エリア 1 2 8 1 eに受 信したデータを設定する。  In step S1402, if the data is device refresh parameter overnight data, the flow shifts to step S1403 to receive the device refresh parameter overnight storage area 1 281 e on the shared memory of the controller. Set the received data.
一方、 受信したデータがデバイスデータの場合には、 ステップ S 1 4 0 4に移行し、 コントローラの共有メモリ 1 2 8 1上のデバイスデータ格 納領域に設定する。 On the other hand, if the received data is device data, the flow advances to step S144 to set the device data storage area in the shared memory 1281 of the controller.
書き込み手段 1 2 8 4を設けたことにより、 ユーザープログラムによ ることなく、 受信したデータの書き込みができる。  By providing the writing means 1 284, the received data can be written without depending on the user program.
次に、 デバイスリフレッシュパラメ一夕データを共有メモリ上に設定 するユーザープログラム 1 2 1 1の動作を第 3 3図のフローチャートを 用いて説明する。  Next, the operation of the user program 1 2 1 1 that sets the device refresh parameter data in the shared memory will be described with reference to the flowchart of FIG.
まずステップ S 1 5 0 1において、 リフレツシュパラメ一夕格納エリ ァ 1 2 8 1 eに格納するデバイスリフレツシュパラメ一夕デ一夕を作成 する。  First, in step S1501, a device refresh parameter storage to be stored in the refresh parameter storage area 1281e is created.
次にステップステップ S 1 5 0 2において、 リフレッシュパラメ一夕デ 一夕をリフレッシュパラメ一夕格納エリァ 1 2 8 1 eに設定し、 転送手 段 1 2 8 3を起動する。 Next, in step S1502, the refresh parameter setting area is set to the refresh parameter setting area 1 2 8 1 e, and the transfer Activate steps 1 2 8 3.
なお、 デバイスリフレッシュパラメ一夕データの作成は、 ユーザープ ログラムとして作成してもよいし、 ユーザ一プログラムによりデバイス リフレツシュパラメ一夕データが格納されているユーザーバッファを指 定してもよい。  The creation of the device refresh parameter data may be created as a user program, or the user buffer in which the device refresh parameter data is stored may be specified by the user program.
以上のように、 本発明にかかるデ一夕処理装置は、 通信回線を介して 接続された制御対象機器との通信プロトコルを、 予め上記制御対象機器 毎に記憶する通信プロトコル記憶手段と、 この通信プロトコル記憶手段 に記憶された通信プロトコルに従い、 制御対象機器が保有するデバイス デ一夕を収集、 あるいは制御対象機器にデバイスデータを設定するデバ イスデータ処理手段と、 このデバイスデータ処理手段が収集した上記デ バイスデータ、 あるいは上記制御対象機器に設定するデバイスデータを 格納する共有メモリ領域と、 この共有メモリ領域と指定されたユーザー バッファとの間で、 上記デバイスデータの授受を行うデータ授受手段と、 を備えたので、 ユーザ一は、 共有メモリの内容を意識するだけでよくな り、 異なる通信プロトコルを意識せず、 統一された手順により異なる通 信プロトコルを有する複数の P L Cとのデバイスデータの収集 Z設定を 行うことができ、 複雑なユーザ一プログラムを作成する必要がなくなり、 ユーザ—プログラムにようする負荷が軽減できる。 また、 コントローラの P L Cとの通信は、 収集手段に負かせ、 ユーザ一 プログラムからは共有メモリへのアクセスのみを行うため、 処理能力が 向上する。  As described above, the data processing apparatus according to the present invention includes: a communication protocol storage unit that previously stores a communication protocol with a control target device connected via a communication line for each of the control target devices; According to the communication protocol stored in the protocol storage means, device data held by the controlled device is collected or device data processing means for setting device data in the controlled device; and A shared memory area for storing device data or device data to be set in the device to be controlled, and data transfer means for transferring the device data between the shared memory area and a designated user buffer. So that the user only needs to be aware of the contents of the shared memory. Collection of device data with multiple PLCs with different communication protocols can be performed in a unified procedure without having to be aware of the communication protocol. The Z setting can be performed, eliminating the need to create a complicated user program. Can be reduced. In addition, the communication with the PLC of the controller is delegated to the collection means, and since only one user program accesses the shared memory, the processing capacity is improved.
特に、 デバイスデ一夕処理手段は、 制御対象機器が保有するデバイス データを収集、 あるいは制御対象機器へのデバイスデータの設定を、 所 定のタイミングで行う、 リフレッシュ制御機能を有していることにより、 最新のデバイスデ一夕を容易に収集 設定することができる。 また、 デバイスデータ処理手段は、 パラメ一夕としてデータが設定さ れている設定データファイルより、 リフレツシュ制御を行う所定のタイ ミングを読み込むので、 リフレッシュのタイミングをパラメ一夕として 設定することが可能となり、 パラメ一夕に基づく処理による処理能力の 向上、 設定値の変更が容易となる。 In particular, the device data overnight processing means has a refresh control function of collecting device data held by the controlled device or setting device data to the controlled device at a predetermined timing. The latest device data can be easily collected and set. Also, since the device data processing means reads a predetermined timing for performing the refresh control from the setting data file in which the data is set as the parameter, the refresh timing can be set as the parameter. However, it is easy to improve the processing capacity and change the set value by the processing based on the parameters.
また、 データ授受手段は、 共有メモリ領域と指定されたユーザーバッ ファとの間の全てのデータ授受を、 予め統一設定された通信手段で行う ので、 ユーザーは、 ユーザーバッファ及び共有メモリ領域との指定のみ でよくなり、 ユーザ一プログラム作成の作業性が向上する。  In addition, since the data exchange means exchanges all data between the shared memory area and the designated user buffer using communication means set in advance, the user can specify the user buffer and the shared memory area. Only, and the workability of creating a user program is improved.
また、 デ一夕授受手段は、 デバイスデ一夕の値の変更の度に共有メモ リ領域とユーザーバッファとの間のデバイスデータ授受を行うので、 デ The data transfer means exchanges device data between the shared memory area and the user buffer every time the value of the device data is changed.
—夕授受が必要最小限で押さえることができる。 —Evening exchanges can be kept to a minimum.
また、 各制御対象機器のデバイスデータ毎に、 共有メモリ領域はプロ ック分けされ、 格納されるので、 データの取扱いが容易となる。  Also, the shared memory area is divided into blocks for each device data of the control target device and stored, so that data handling becomes easy.
また、 この発明にかかるデータ処理方法は、 通信回線を介して接続さ れた制御対象機器との通信プロトコルを、 予め上記制御対象機器毎に記 憶された通信プロ卜コル記憶手段から読み出す工程と、 読み出された通 信プロトコルに従い、 上記通信回線を介して上記制御対象機器が保有す るデバイスデ一夕を収集、 あるいは上記制御対象機器にデバイスデ一夕 を設定する工程と、 制御対象機器から収集したデバイスデータ、 あるい は制御対象機器に設定するデバイスデータを共有メモリ領域に格納する 工程と、 共有メモリ領域と指定されたユーザーバッファとの間で、 上記 デバイスデータの授受を行う工程と、 を備えたので、 ユーザーは、 共有 メモリの内容を意識するだけでよくなり、 異なる通信プロトコルを意識 せず、 統一された手順により異なる通信プロトコルを有する複数の P L Cとのデバイスデータの収集 Z設定を行うことができ、 複雑なユーザー プログラムを作成する必要がなくなり、 ユーザ一プログラムに要する負 荷が軽減できる。 - また、 コントローラの P L Cとの通信は、 収集手段に負かせ、 ユーザー プログラムからは共有メモリへのアクセスのみを行うため、 処理能力が 向上する。 Further, the data processing method according to the present invention includes a step of reading a communication protocol with a control target device connected via a communication line from a communication protocol storage means stored in advance for each of the control target devices. Collecting the device data held by the controlled device via the communication line or setting the device data to the controlled device via the communication line according to the read communication protocol; Storing in the shared memory area the device data collected from the device or the device data to be set in the controlled device; and transmitting and receiving the device data between the shared memory area and the designated user buffer. , The user only needs to be aware of the contents of the shared memory, and is not aware of different communication protocols, Device data collection with multiple PLCs with different communication protocols can be performed through complicated procedures. There is no need to create a program, and the load required for one user program can be reduced. -In addition, the communication between the controller and the PLC is delegated to the collection means, and only the shared memory is accessed from the user program, so the processing capacity is improved.
また、 制御対象機器から収集したデバイスデータ、 あるいは制御対象 機器に設定するデバイスデ一夕を共有メモリ領域に格納する工程は、 予 め設定された所定のタイミングで実行されるので、 最新のデバイスデー 夕を容易に収集 Z設定することができる。  In addition, since the process of storing the device data collected from the control target device or the device data set for the control target device in the shared memory area is executed at a predetermined timing set in advance, the latest device data is stored. Easily collect evenings Z can be set.
また、 この発明にかかるデータ処理システムは、 第 1の通信回線を介 して制御対象機器と接続されたコントローラが、 第 2の通信回線を介し て複数接続されたデータ処理システムにおいて、 上記コントロ一ラは、 第 1の通信回線における通信プロ卜コルに従い、 上記制御対象機器が保 有するデバイスデータを収集、 あるいは制御対象機器にデバイスデ一夕 を設定するデバイスデータ処理手段と、 このデバイスデータ処理手段が 収集した上記デバイスデータ、 あるいは上記制御対象機器に設定するデ バイスデータを格納する共有メモリ領域と、 この共有メモリ領域と指定 されたユーザーバッファとの間で、 上記デバィスデ一夕の授受を行うデ —夕授受手段と、 第 2の通信回線の通信プロトコルを、 予め記憶する第 2の通信プロトコル記憶手段と、 この第 2の通信プロトコル記憶手段に 記憶された上記第 2の通信回線の通信プロトコルに従い、 上記共有メモ リ領域に格納された上記デバイスデータを、 上記第 2の通信回線を介し て送信する送信手段と、 上記第 2の通信回線を介して送信されてきたデ バイスデ一夕を上記共有メモリ領域に格納する書込み手段と、 を備えた ので、 ユーザーは、 共有メモリの内容を意識するだけでよくなり、 異な る通信プロトコルを意識せず、 統一された手順により異なる通信プロト コルを有する複数の P L C、 コントローラとのデバイスデ一夕の収集 Z 設定を行うことができ、 複雑なユーザープログラムを作成する必要がな くなり、 ユーザ一プログラムにようする負荷が軽減できる。 Further, in the data processing system according to the present invention, in the data processing system in which a controller connected to a device to be controlled through a first communication line is connected in plurality through a second communication line, Device data processing means for collecting device data held by the control target device or setting device data to the control target device in accordance with a communication protocol on the first communication line; and A device for transmitting and receiving the device data between the shared memory area for storing the device data collected by the device or the device data to be set in the control target device, and the designated user buffer. —Second communication protocol that stores evening communication means and the communication protocol of the second communication line in advance In accordance with the communication protocol of the second communication line stored in the second communication protocol storage device, the device data stored in the shared memory area is stored via the second communication line. The user is conscious of the contents of the shared memory because the transmission means for transmitting and the writing means for storing the device data transmitted via the second communication line in the shared memory area are provided. Only need to be aware of different communication protocols. Collection of device data with multiple PLCs and controllers that have multiple controllers Z can be set, eliminating the need to create complex user programs and reducing the load of a single user program.
また、 コントローラとの通信は、 収集手段に負かせ、 ユーザ一プログラ ムからは共有メモリへのアクセスのみを行うため、 処理能力が向上する。 特に、 第 1の通信回線を介して接続された制御対象機器との第 1 の通 信プロ トコルを、 予め上記制御対象機器毎に記憶する第 1の通信プロト コル記憶手段を備えたので、 ユーザ一プログラムにより通信プロトコル を設定する必要がなくなり、 プログラムの肥大化を防止できる。 In addition, the communication with the controller is delegated to the collection means, and since only one user program accesses the shared memory, the processing capacity is improved. In particular, since the first communication protocol storage means for storing in advance the first communication protocol with the control target device connected via the first communication line for each control target device is provided, It is not necessary to set the communication protocol by one program, and it is possible to prevent the program from being enlarged.
また、 デバイスデータ処理手段は、 制御対象機器が保有するデバイス データを収集、 あるいは制御対象機器へのデバイスデータの設定を、 所 定のタイミングで順次行う、 リフレツシュ制御機能を有しているので、 コント口一ラ間において最新のデバイスデータを容易に収集 Z設定する ことができる。  The device data processing means has a refresh control function of collecting device data held by the controlled device or setting device data to the controlled device sequentially at a predetermined timing. The latest device data can be easily collected and set between the clients.
また、 送信手段は、 共有メモリ領域に格納されているパラメ一夕に基 づき、 デバイスデ一夕を、 所定のタイミングで第 2の通信回線を介して 送信するので、 リフレッシュのタイミングをパラメ一夕として設定する ことが可能となり、 パラメ一夕に基づく処理による処理能力の向上、 設 定値の変更が容易となる。  Further, the transmitting means transmits the device data via the second communication line at a predetermined timing based on the parameters stored in the shared memory area. This makes it possible to improve the processing capacity and change the set value by processing based on the parameters.
また、 送信手段は、 所定のパラメ一夕に基づき動作する起動手段から の一定間隔のタイミングで動作するので、 常に一定のタイミングで動作 し、 データの信頼性が向上するとともに、 タイミングをユーザ一プログ ラムにより設定する必要がなく、 プログラムの肥大化を防止できる。 また、 書込み手段は、 共有メモリ領域に第 2の通信回線を介して送信 されてきたデバイスデ一夕を書込む際に、 各デバイス毎のブロックに分 けて格納するので、 デ一夕の取扱いが容易となる。 また、 第 2の通信回線は、 イーサネットプロ トコルであるので、 シス テムの自由度が増す。 - また、 共有メモリ上に格納されたパラメ一夕を、 第 2の通信回線を介 して送信するので、 第 2の通信回線を介して接続されたコントローラ間 において、 同一のパラメ一夕を容易に設定することができ、 従来、 周辺 装置を接続し直して設定していたパラメ一夕の設定の作業効率が向上す る。 In addition, the transmitting means operates at a constant interval from the starting means operating based on a predetermined parameter, so that the transmitting means always operates at a constant timing, improving the reliability of data, and improving the timing of the user program. There is no need to set by the ram, and the program can be prevented from becoming too large. Also, when writing the device data transmitted via the second communication line to the shared memory area, the writing means stores the data in blocks for each device. Becomes easier. Also, since the second communication line uses the Ethernet protocol, the degree of freedom of the system is increased. -Also, since the parameters stored in the shared memory are transmitted via the second communication line, the same parameters can be easily transmitted between controllers connected via the second communication line. The work efficiency of parameter setting, which has been set by reconnecting peripheral devices in the past, is improved.
また、 第 2の通信回線を介して送信されてきたデータが、 パラメ一夕 かデバイスデ一夕であるかを判断し、 パラメ一夕である場合は共有メモ リ上のパラメ一夕格納エリアに格納し、 デバイスデータである場合は制 御対象機器毎の格納エリアに格納するので、 ユーザープログラムによる 設定によることなく送信されてきたデータを任意に分類分けして格納す ることができ、 ユーザーの負荷を軽減することができる。 産業上の利用可能性  In addition, it is determined whether the data transmitted via the second communication line is a parameter or device data overnight. If the data is a parameter overnight, the data is stored in the parameter storage area on the shared memory. The data is stored, and if it is device data, it is stored in the storage area for each device to be controlled, so the transmitted data can be arbitrarily classified and stored without setting by the user program, The load can be reduced. Industrial applicability
以上のように、本発明にかかるデータ処理装置及びデータタ処理方法並 びにデータ処理システムは、 所定の通信プロトコルにより接続された P L C、 コントロ一ラ間においてデータ収集 Z設定において用いられるの に適している。  As described above, the data processing device, the data processing method, and the data processing system according to the present invention are suitable for being used in data collection Z setting between a PLC and a controller connected by a predetermined communication protocol. .

Claims

請 求 の 範 囲 - The scope of the claims -
1 . 通信回線を介して接続された制御対象機器との通信プロトコルを、 予め上記制御対象機器毎に記憶する通信プロ卜コル記憶手段と、 1. Communication protocol storage means for storing in advance a communication protocol with a control target device connected via a communication line for each control target device,
この通信プロトコル記憶手段に記憶された通信プロトコルに従い、 制 御対象機器が保有するデバイスデータを収集、 あるいは制御対象機器に デバイスデ一夕を設定するデバイスデータ処理手段と、  Device data processing means for collecting device data held by the controlled device or setting device data to the controlled device according to the communication protocol stored in the communication protocol storage means;
このデバイスデータ処理手段が収集した上記デバイスデータ、 あるい は上記制御対象機器に設定するデバイスデ一夕を格納する共有メモリ領 域と、  A shared memory area for storing the device data collected by the device data processing means or a device data set for the controlled device;
この共有メモリ領域と指定されたユーザ一バッファとの間で、 上記デ バイスデータの授受を行うデータ授受手段と、  Data transfer means for transferring the device data between the shared memory area and a designated user buffer;
を備えたデータ処理装置。 Data processing device provided with.
2 . デバイスデータ処理手段は、 制御対象機器が保有するデバイスデー 夕を収集、 あるいは制御対象機器へのデバイスデータの設定を、 所定の タイミングで行う、 リフレッシュ制御機能を有していることを特徴とす る請求項 1に記載のデータ処理装置。  2. The device data processing means has a refresh control function of collecting device data held by the controlled device or setting device data to the controlled device at a predetermined timing. The data processing device according to claim 1.
3 . デバイスデータ処理手段は、 パラメータとしてデータが設定され ている設定データファイルより、 リフレッシュ制御を行う所定の夕イミ ングを読み込むことを特徴とする請求項 2に記載のデ一夕処理装置。  3. The data processing apparatus according to claim 2, wherein the device data processing means reads a predetermined evening image for performing refresh control from a setting data file in which data is set as a parameter.
4 . デ一夕授受手段は、 共有メモリ領域と指定されたユーザーバッフ ァとの間の全てのデータ授受を、 予め統一設定された通信手段で行うこ とを特徴とする請求項 1に記載のデータ処理装置。  4. The data transmission / reception means according to claim 1, wherein all data transmission / reception between the shared memory area and the designated user buffer is performed by a communication means set in advance. Data processing device.
5 . データ授受手段は、 デバイスデ一夕の値の変更の度に共有メモリ 領域とユーザーバッファとの間のデバイスデータ授受を行うことを特 徴とする請求項 1に記載のデータ処理装置。 5. The data transfer means is designed to transfer device data between the shared memory area and the user buffer every time the value of the device data is changed. The data processing device according to claim 1, wherein
6 . 各制御対象機器のデバイスデータ毎に、 共有メモリ領域はブロッ ク分けされ、 格納されることを特徴とする請求項 1に記載のデータ処理 装置。  6. The data processing device according to claim 1, wherein the shared memory area is divided into blocks and stored for each device data of each device to be controlled.
7 . 通信回線を介して接続された制御対象機器との通信プロトコルを、 予め上記制御対象機器毎に記憶された通信プロ卜コル記憶手段から読み 出す工程と、  7. a step of reading a communication protocol with a control target device connected via a communication line from communication protocol storage means stored in advance for each control target device;
読み出された通信プロトコルに従い、 上記通信回線を介して上記制御 対象機器が保有するデバイスデ一夕を収集、 あるいは上記制御対象機器 にデバイスデータを設定する工程と、  Collecting the device data held by the controlled device via the communication line or setting device data in the controlled device according to the read communication protocol;
制御対象機器から収集したデバイスデ一夕、 あるいは制御対象機器に 設定するデバイスデ一夕を共有メモリ領域に格納する工程と、  Storing the device data collected from the control target device or the device data set for the control target device in the shared memory area;
共有メモリ領域と指定されたユーザ一バッファとの間で、 上記デバィ スデ一夕の授受を行う工程と、  Transmitting and receiving the device data between the shared memory area and the designated user buffer;
を備えたデータ処理方法。 Data processing method provided with.
8 . 制御対象機器から収集したデバイスデータ、 あるいは制御対象機 器に設定するデバイスデータを共有メモリ領域に格納する工程は、 予め 設定された所定のタイミングで実行されることを特徴とする請求項 7に 記載のデータ処理方法。  8. The step of storing the device data collected from the control target device or the device data to be set in the control target device in the shared memory area is performed at a predetermined timing set in advance. Data processing method described in.
9 . 第 1の通信回線を介して制御対象機器と接続されたコントローラ 力 第 2の通信回線を介して複数接続されたデータ処理システムにおい て、  9. A controller connected to the device to be controlled via the first communication line In a data processing system connected to a plurality of devices via the second communication line,
上記コントローラは、  The above controller is
第 1の通信回線における通信プロ卜コルに従い、 上記制御対象機器が 保有するデバイスデータを収集、 あるいは制御対象機器にデバイスデ一 夕を設定するデバイスデータ処理手段と、 このデバィスデータ処理手段が収集した上記デバィスデ一夕、 あるい は上記制御対象機器に設定するデバイスデ一夕を格納する共有メモリ領 域と、 Device data processing means for collecting device data held by the controlled device or setting device data to the controlled device according to a communication protocol in the first communication line; A shared memory area for storing the device data collected by the device data processing means or the device data set for the controlled device;
この共有メモリ領域と指定されたユーザーバッファとの間で、 上記デ バイスデータの授受を行うデ一夕授受手段と、  Data transfer means for transferring the device data between the shared memory area and the designated user buffer;
第 2の通信回線の通信プロトコルを、 予め記憶する第 2の通信プロト コル記憶手段と、  Second communication protocol storage means for storing the communication protocol of the second communication line in advance;
この第 2の通信プロトコル記憶手段に記憶された上記第 2の通信回線 の通信プロトコルに従い、 上記共有メモリ領域に格納された上記デバィ スデータを、 上記第 2の通信回線を介して送信する送信手段と、 上記第 2の通信回線を介して送信されてきたデバイスデータを上記共 有メモリ領域に格納する書込み手段と、  Transmitting means for transmitting, via the second communication line, the device data stored in the shared memory area according to the communication protocol of the second communication line stored in the second communication protocol storing means; Writing means for storing the device data transmitted via the second communication line in the shared memory area;
を備えたことを特徴とするデータ処理システム。 A data processing system comprising:
1 0 . 第 1の通信回線を介して接続された制御対象機器との第 1 の通 信プロトコルを、 予め上記制御対象機器毎に記憶する第 1の通信プロト コル記憶手段を備えることを特徴とする請求項 9に記載のデータ処理シ ステム。  10. A first communication protocol storage means for storing, in advance, for each of the control target devices, a first communication protocol with the control target device connected via the first communication line. The data processing system according to claim 9, wherein
1 1 . デバイスデータ処理手段は、 制御対象機器が保有するデバイス デ一夕を収集、 あるいは制御対象機器へのデバイスデータの設定を、 所 定のタイミングで順次行う、 リフレッシュ制御機能を有していることを 特徴とする請求項 9に記載のデータ処理システム。  1 1. The device data processing means has a refresh control function that collects device data held by the controlled device or sets device data to the controlled device sequentially at a predetermined timing. The data processing system according to claim 9, wherein:
1 2 . 送信手段は、 共有メモリ領域に格納されているパラメ一夕に基 づき、 デバイスデータを、 所定のタイミングで第 2の通信回線を介して 送信することを特徴とする請求項 9に記載のデータ処理システム。  12. The transmitting means according to claim 9, wherein the transmitting means transmits the device data via the second communication line at a predetermined timing based on the parameters stored in the shared memory area. Data processing system.
1 3 . 送信手段は、 所定のパラメ一夕に基づき動作する起動手段から の一定間隔のタイミングで動作することを特徴とする請求項 1 2に記載 のデータ処理: 13. The transmitting means according to claim 12, wherein the transmitting means operates at a predetermined interval from the activating means operating based on a predetermined parameter. Data processing of:
1 4 . 書込み手段は、 共有メモリ領域に第 2の通信回線を介して送信 されてきたデバイスデ一夕を書込む際に、 各デバイス毎のブロックに分 けて格納することを特徴とする請求項 9に記載のデータ処理システム。  14. The writing means, when writing the device data transmitted via the second communication line to the shared memory area, stores the data in blocks for each device. Item 10. The data processing system according to Item 9.
1 5 . 第 2の通信回線は、 イーサネッ トプロトコルであることを特徴 とする請求項 9に記載のデータ処理システム。  15. The data processing system according to claim 9, wherein the second communication line is an Ethernet protocol.
1 6 . 共有メモリ上に格納されたパラメ一夕を、 第 2の通信回線を介 して送信することを特徴とする請求項 9に記載のデータ処理システム。  16. The data processing system according to claim 9, wherein the parameter stored in the shared memory is transmitted via the second communication line.
1 7 . 第 2の通信回線を介して送信されてきたデータが、 パラメ一夕 かデバイスデータであるかを判断し、 パラメータである場合は共有メモ リ上のパラメ一夕格納エリアに格納し、 デバイスデータである場合は制 御対象機器毎の格納エリアに格納することを特徴とする請求項 1 6に記 載のデータ処理システム。  17. Judge whether the data transmitted via the second communication line is a parameter or device data, and if it is a parameter, store it in the parameter storage area on shared memory, 17. The data processing system according to claim 16, wherein device data is stored in a storage area for each device to be controlled.
PCT/JP1997/001275 1997-04-14 1997-04-14 Data processor, data processing method, and data processing system WO1998047073A1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/JP1997/001275 WO1998047073A1 (en) 1997-04-14 1997-04-14 Data processor, data processing method, and data processing system
GB9924381A GB2339940B (en) 1997-04-14 1997-04-14 Method and apparatus for processing data, and data processing system
DE19782267T DE19782267T1 (en) 1997-04-14 1997-04-14 Method and device for processing data and data processing system
HK00104726A HK1025410A1 (en) 1997-04-14 2000-07-27 Method and apparatus for processing data, and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP1997/001275 WO1998047073A1 (en) 1997-04-14 1997-04-14 Data processor, data processing method, and data processing system

Publications (1)

Publication Number Publication Date
WO1998047073A1 true WO1998047073A1 (en) 1998-10-22

Family

ID=14180406

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1997/001275 WO1998047073A1 (en) 1997-04-14 1997-04-14 Data processor, data processing method, and data processing system

Country Status (4)

Country Link
DE (1) DE19782267T1 (en)
GB (1) GB2339940B (en)
HK (1) HK1025410A1 (en)
WO (1) WO1998047073A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013024877A1 (en) * 2011-08-17 2013-02-21 株式会社クロスアビリティ Communication device, communication processing program, monitoring system, data logger

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6574743B1 (en) * 1999-03-30 2003-06-03 Siemens Energy & Automation Programmable logic controller method, system and apparatus
US7613783B2 (en) * 2004-08-17 2009-11-03 Schneider Automation Inc. Gateway having an input/output scanner
CN108255124B (en) * 2016-12-28 2021-05-14 欧姆龙株式会社 Method, device and system for transferring program and parameter of PLC

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01251258A (en) * 1988-03-31 1989-10-06 Mitsubishi Electric Corp Shared area managing system in network system
JPH03158947A (en) * 1989-11-17 1991-07-08 Nec Corp Communication control system
JPH0594542A (en) * 1991-10-02 1993-04-16 Nec Software Ltd Data collection/distribution control system
JPH07175763A (en) * 1993-09-27 1995-07-14 Internatl Business Mach Corp <Ibm> Method and apparatus for mutual exchange of multimedia data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5875242A (en) * 1981-10-29 1983-05-06 Seikosha Co Ltd Data processing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01251258A (en) * 1988-03-31 1989-10-06 Mitsubishi Electric Corp Shared area managing system in network system
JPH03158947A (en) * 1989-11-17 1991-07-08 Nec Corp Communication control system
JPH0594542A (en) * 1991-10-02 1993-04-16 Nec Software Ltd Data collection/distribution control system
JPH07175763A (en) * 1993-09-27 1995-07-14 Internatl Business Mach Corp <Ibm> Method and apparatus for mutual exchange of multimedia data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013024877A1 (en) * 2011-08-17 2013-02-21 株式会社クロスアビリティ Communication device, communication processing program, monitoring system, data logger

Also Published As

Publication number Publication date
HK1025410A1 (en) 2000-11-10
GB2339940B (en) 2002-08-14
GB2339940A (en) 2000-02-09
GB9924381D0 (en) 1999-12-15
DE19782267T1 (en) 2000-06-21

Similar Documents

Publication Publication Date Title
JP5173475B2 (en) Remote controller apparatus, control method thereof, and program
KR100512388B1 (en) Information transmission method and device
WO1998047073A1 (en) Data processor, data processing method, and data processing system
JPH0950312A (en) Data processing method for fa controller
JP2006099809A (en) Controller
JP4479220B2 (en) Production equipment control device, production equipment control system, and production equipment control method using production equipment control device
JPH086614A (en) Programmable controller
JPH0871979A (en) Robot controller
JP3329399B2 (en) Data link system
JP2522847B2 (en) Programmable controller system
JPS582496B2 (en) Data transfer method
JPS63187309A (en) Numerical control system
JPH07210214A (en) Control system and processing method for data
JP4534424B2 (en) COMMUNICATION ROBOT DEVICE, COMMUNICATION ROBOT DEVICE CONTROL METHOD, AND COMMUNICATION ROBOT PROGRAM
JP5663418B2 (en) Plant control system
JP2001251318A (en) Gateway system and information terminal
JP2007048231A (en) Control system
JPS581363A (en) Data transmission processing system
JPH03143472A (en) Sewing machine equipment
JP2003139376A (en) Control device for air conditioner
JPH03113506A (en) Program control system
JPH05143126A (en) Nc program management system
JP2002278608A (en) Exclusive processing data transmission system for plant control system
JPH0458219B2 (en)
JPS61103209A (en) Bidirectional interface device for numerical dontrol data

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): DE GB JP US

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
ENP Entry into the national phase

Ref document number: 9924381

Country of ref document: GB

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 09402860

Country of ref document: US

RET De translation (de og part 6b)

Ref document number: 19782267

Country of ref document: DE

Date of ref document: 20000621

WWE Wipo information: entry into national phase

Ref document number: 19782267

Country of ref document: DE