Nothing Special   »   [go: up one dir, main page]

JP2011191874A - Data signal transmission and reception method - Google Patents

Data signal transmission and reception method Download PDF

Info

Publication number
JP2011191874A
JP2011191874A JP2010055831A JP2010055831A JP2011191874A JP 2011191874 A JP2011191874 A JP 2011191874A JP 2010055831 A JP2010055831 A JP 2010055831A JP 2010055831 A JP2010055831 A JP 2010055831A JP 2011191874 A JP2011191874 A JP 2011191874A
Authority
JP
Japan
Prior art keywords
data signal
time delay
transmission
delay information
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010055831A
Other languages
Japanese (ja)
Inventor
Masahiko Yokoo
雅彦 横尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koyo Electronics Industries Co Ltd
Original Assignee
Koyo Electronics Industries Co Ltd
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 Koyo Electronics Industries Co Ltd filed Critical Koyo Electronics Industries Co Ltd
Priority to JP2010055831A priority Critical patent/JP2011191874A/en
Publication of JP2011191874A publication Critical patent/JP2011191874A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To transmit a data signal at a high speed by automatically setting the transmission time delay of the data signal to a PLC body even when the number of expansion units is increased, and setting a data signal processing signal from the PLC body in accordance with the above automatic setting. <P>SOLUTION: Each of expansion units 21 to 24 measures time delay required for self-transmission with respect to a data signal, sets up the measured time delay information due to the self-transmission as delay information to a memory inside itself, and transmits known time delay information due to the transmission of the data signal in each of communication cables 31 to 34 and the measured time delay information due to the self-transmission to the rear stage side. The PLC body 10 causes a data signal processing signal having the same cycle as that of a clock signal to delay by the time delay included in both of the time delay information, causes the delayed data signal processing signal to rise, and then performs the capturing processing of the data signal to be transmitted from the extended unit at the rising and falling timing of the data signal processing signal and the transfer processing of the data signal to the extended unit. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、リングデータ通信方式におけるデータ信号送受信方法に関わり、より詳しくはPLC本体からデータ信号を拡張ユニットに転送し、その転送したデータ信号をPLC本体が取り込んでから次のデータ信号の転送を開始させるリングデータ通信方式によるデータ信号通信方法において、上記データ信号の遅れ情報のセットアップを行うことで、当該データ信号の高速通信処理を可能とすることに関するものである。   The present invention relates to a data signal transmission / reception method in a ring data communication system, and more specifically, transfers a data signal from a PLC main body to an extension unit, and transfers the next data signal after the transferred data signal is captured by the PLC main body. In the data signal communication method by the ring data communication system to be started, the present invention relates to enabling high-speed communication processing of the data signal by setting up the delay information of the data signal.

PLCは、プログラマブルコントローラまたはプログラマブルロジックコントローラとも称され、PLC全体を制御するPLC本体と、PLC本体により制御される、I/Oユニット、DA変換ユニットなどの様々な拡張ユニットと、から構成されている。   The PLC is also called a programmable controller or a programmable logic controller, and is composed of a PLC main body that controls the entire PLC, and various extension units such as an I / O unit and a DA conversion unit that are controlled by the PLC main body. .

拡張ユニットは、ユーザ仕様により機種、台数等が決定される。PLCの制御プログラムの作成、拡張ユニット毎の各種設定は、外部のコンピュータにより、例えばユーザプログラム作成支援ソフト搭載のプログラミングツールにより行われる(特許文献1参照。)。   The type and number of expansion units are determined according to user specifications. The creation of a PLC control program and various settings for each expansion unit are performed by an external computer, for example, a programming tool installed in user program creation support software (see Patent Document 1).

図6に示すPLCは、PLC本体100と、複数台の第1−第4拡張ユニット210−240とを有する。これらはRS232C等の第1−第4通信ケーブル310−340により接続されている。これら第1−第4通信ケーブル310−340の接続長さは各種である。図6に示すtx1,tx2,tx3,tx4はPLC本体100から拡張ユニットに送信されるデータ信号Sxの各通信ケーブル310−340内伝送による時間遅れ分、td1,td2,td3,td4は上記データ信号Sxの各拡張ユニット210−240内伝送による時間遅れ分を示す。これらを合計した時間遅れ(tx1+tx2+tx3+tx4)+(td1+td2+td3+td4)を時間遅れ分tと言うこととする。   The PLC shown in FIG. 6 includes a PLC main body 100 and a plurality of first to fourth extension units 210-240. These are connected by first to fourth communication cables 310-340 such as RS232C. The connection lengths of the first to fourth communication cables 310 to 340 are various. 6, tx1, tx2, tx3, and tx4 are time delays due to transmission of the data signal Sx transmitted from the PLC main body 100 to the extension unit in each communication cable 310-340, and td1, td2, td3, and td4 are the data signals. A time delay due to the transmission of Sx in each expansion unit 210-240 is shown. The total time delay (tx1 + tx2 + tx3 + tx4) + (td1 + td2 + td3 + td4) is referred to as a time delay t.

PLC本体100は内部クロック信号CLKxに同期して各拡張ユニット210−240にデータ信号Sxを送信する。これらデータ信号Sxの通信方式はリングデータ通信方式であり、PLC本体100から拡張ユニット210−240に送信されたデータ信号SxがPLC本体100にデータ信号Sxaとして戻されるまでは次のデータ信号は送信されないようになっている。   The PLC main body 100 transmits a data signal Sx to each expansion unit 210-240 in synchronization with the internal clock signal CLKx. The communication method of these data signals Sx is a ring data communication method, and the next data signal is transmitted until the data signal Sx transmitted from the PLC main body 100 to the extension unit 210-240 is returned to the PLC main body 100 as the data signal Sxa. Not to be.

そして、図7で示すデータ信号Sx,Sxaにおいて、「x」はx=1,2,3,4,…、である。そして、データ信号Sxは、PLC本体100から各拡張ユニット210−240に転送されるデータ信号であり、データ信号Sxaは、データ信号Sxに添字「a」を付けて、PLC本体100から転送後、時間遅れ分tの経過後にPLC本体100に戻ってきたデータ信号Sxを示す。   In the data signals Sx and Sxa shown in FIG. 7, “x” is x = 1, 2, 3, 4,. The data signal Sx is a data signal transferred from the PLC main body 100 to each expansion unit 210-240. The data signal Sxa is appended with the subscript “a” to the data signal Sx, and transferred from the PLC main body 100. Data signal Sx returned to PLC main body 100 after elapse of time delay t is shown.

特開2002−108422号公報JP 2002-108422 A

上記従来方式の場合、例えば図8(a)で示すように時刻t0にPLC本体100から各拡張ユニット210−240に転送されたデータ信号Sxが遅れ時間分tの経過後の時刻t1は図8(b)で示すようにデータ信号Sxaとして受信されてPLC本体100に取り込み処理される。そして、この場合の時間遅れ分tは、PLC本体100では図8(c)で示すクロック信号CLKxのクロック幅tw内であるから、データ信号Sxの取り込み処理をすることができる。この場合のクロック幅twに相当する時間遅れ分tは既定時間となる。   In the case of the conventional method, for example, as shown in FIG. 8A, the time t1 after the lapse of the delay time t is the time t1 after the data signal Sx transferred from the PLC main body 100 to each expansion unit 210-240 at the time t0. As shown in (b), it is received as a data signal Sxa and taken into the PLC main body 100. Since the time delay t in this case is within the clock width tw of the clock signal CLKx shown in FIG. 8C in the PLC main body 100, the data signal Sx can be captured. In this case, a time delay t corresponding to the clock width tw is a predetermined time.

ここで、クロック信号CLKxの立ち上がり期間はデータ信号Sxの取り込み処理期間であり、立ち下がり期間は転送処理期間である。   Here, the rising period of the clock signal CLKx is a data signal Sx capturing process period, and the falling period is a transfer process period.

しかしながら、図8(a)(b)(c)に対応する図9(a)(b)(c)で示すように、各通信ケーブル310−340と各拡張ユニット210−240との通過によるデータ信号Sxの時間遅れ分tが、クロック信号CLKxのクロック幅twを遅延時間分Δtを超過して、遅延時間分Δt、上記既定時間tから遅れているために、PLC本体100はデータ信号Sxaの取り込み処理をすることができなくなる。   However, as shown in FIGS. 9 (a), (b), and (c) corresponding to FIGS. 8 (a), (b), and (c), data due to the passage of each communication cable 310-340 and each expansion unit 210-240. Since the time delay t of the signal Sx exceeds the clock width tw of the clock signal CLKx by the delay time Δt and is delayed from the predetermined time t by the delay time Δt, the PLC main body 100 detects the data signal Sxa. The import process cannot be performed.

そこで、従来では、図9(c)で示すようにクロック信号CLKxのパルス幅twよりもパルス幅Δtだけ長いパルス幅を持つことで上記時間遅れ分tに相当する長さのデータ信号処理信号Pxを生成し、このデータ信号処理信号Pxの立ち上がり期間においてデータ信号の取り込み処理をしていた。   Therefore, conventionally, as shown in FIG. 9C, the data signal processing signal Px having a length corresponding to the time delay t by having a pulse width longer than the pulse width tw of the clock signal CLKx by the pulse width Δt. And the data signal is captured during the rising period of the data signal processing signal Px.

そのことを、図10を参照して説明する。図10(a)は、それぞれパルス幅twの各クロック信号CLK1,CLK2,CLK3,…を示し、図10(b)は、PLC本体100側からのデータ信号S1,S2,S3,と、データ信号S1,S2,S3転送後から時間遅れ分tでもってPLC本体100に受信されるデータ信号S1a,S2a,S3aと、を示す。データ信号S1とS1aとの間の時間差、S2とS2aとの間の時間差、S3とS3aとの間の時間差は時間遅れ分tであり、時間遅れ分tのS1a,S2,S2a,…に対して図10(a)で示すクロック信号CLK1,CLK2,CLK3,…のパルス幅twに時間差Δtを加味した図10(c)で示すデータ信号処理信号P10,P20…で制御することが必要となる。ここで、例えばクロック信号CLK1の立ち上がり期間は位相的には0−180度であり、立ち下がり期間(半周期)は180−360度である。   This will be described with reference to FIG. 10A shows the clock signals CLK1, CLK2, CLK3,... Having a pulse width tw, and FIG. 10B shows the data signals S1, S2, S3 from the PLC main body 100 side and the data signals. Data signals S1a, S2a, S3a received by the PLC main body 100 with a time delay t after the transfer of S1, S2, S3 are shown. The time difference between the data signals S1 and S1a, the time difference between S2 and S2a, and the time difference between S3 and S3a are time delays t, which are relative to S1a, S2, S2a,. It is necessary to control with the data signal processing signals P10, P20,... Shown in FIG. 10C in which the time difference Δt is added to the pulse width tw of the clock signals CLK1, CLK2, CLK3,. . Here, for example, the rising period of the clock signal CLK1 is 0-180 degrees in terms of phase, and the falling period (half cycle) is 180-360 degrees.

結局、従来では、拡張ユニットが増加するたびに、ユーザーは上記データ信号の時間遅れ情報をPLC本体100に設定することが必要となるが、この設定はユーザーには煩わしい設定となっている。   After all, conventionally, whenever the number of expansion units increases, the user needs to set the time delay information of the data signal in the PLC main body 100, but this setting is troublesome for the user.

したがって、本発明においては、ケーブル内伝送と拡張ユニット内伝送とによるデータ信号の時間遅れ情報を当該拡張ユニットに自動的にセットアップし、このセットアップした時間遅れ情報をPLC本体に与えることで、データ信号処理信号のパルス幅を自動設定して、リングデータ通信方式におけるデータ信号の高速伝送を可能とすることを解決すべき課題としている。   Therefore, in the present invention, the time delay information of the data signal due to the transmission in the cable and the transmission in the extension unit is automatically set up in the extension unit, and the set time delay information is given to the PLC main body, thereby It is an object to be solved to automatically set the pulse width of the processing signal to enable high-speed transmission of the data signal in the ring data communication system.

本発明によるデータ信号送受信方法は、PLC本体から通信ケーブルを介して順次に複数の拡張ユニットにデータ信号をクロック信号に同期して転送すると共に、転送し終えてPLC本体に戻るデータ信号を当該PLC本体で取り込み処理を行うリングデータ通信方式によるデータ信号送受信方法において、
各拡張ユニットは、前段側からデータ信号を受信するステップと、受信したデータ信号に対して自身内伝送に要する時間遅れを計測するステップと、上記計測した自身内伝送による時間遅れ情報を自身内部のメモリに遅延情報としてセットアップするステップと、受信したデータ信号に対して前段側との間に接続された通信ケーブル内伝送による既知の時間遅れ情報と、上記計測した自身内伝送による時間遅れ情報とを後段側に伝送するステップと、を実行し、
PLC本体は、少なくとも前記拡張ユニットから伝送される上記両時間遅れ情報に含む時間遅れ分だけ、クロック信号と同じ周期のデータ信号処理信号を遅延させて立ち上がらせるステップと、それ以降は上記データ信号処理信号の立ち上がり、立ち下がりタイミングで拡張ユニットから伝送されるデータ信号の取り込み処理と、拡張ユニットへのデータ信号の転送処理とを行うステップと、を実行する、ことを特徴とする。
The data signal transmission / reception method according to the present invention sequentially transfers a data signal from a PLC main body to a plurality of extension units via a communication cable in synchronization with a clock signal, and transmits the data signal returned to the PLC main body after completing the transfer. In the data signal transmission / reception method by the ring data communication method that performs capture processing in the main body,
Each extension unit receives a data signal from the front side, measures a time delay required for the transmission within itself with respect to the received data signal, and transmits the time delay information due to the measured transmission within itself to the internal unit. A step of setting up as delay information in the memory, a known time delay information by transmission in the communication cable connected between the received data signal and the preceding stage side, and a time delay information by the measured transmission within itself A step of transmitting to the subsequent stage, and
The PLC main body delays the data signal processing signal having the same cycle as the clock signal to rise by at least the time delay included in the both time delay information transmitted from the extension unit, and thereafter the data signal processing. The step of taking in the data signal transmitted from the expansion unit at the rising and falling timing of the signal and the step of transferring the data signal to the expansion unit are performed.

好ましくは、前記拡張ユニットは、データ信号の自身内伝送による時間遅れを、該拡張ユニット内保有の時間遅れ計測タイマにより計測し、その計測した情報を時間遅れ情報とする。   Preferably, the extension unit measures a time delay due to the internal transmission of the data signal by a time delay measurement timer held in the extension unit, and uses the measured information as time delay information.

本発明では、データ信号が通信ケーブル内通過および拡張ユニット内通過に時間を要し、PLC本体から転送開始されてPLC本体に戻るまでに時間遅れがあっても、クロック信号と同じ周期のデータ信号処理信号によりデータ信号を取り込み処理することができるようになり、拡張ユニット数が増加してもクロック信号のクロック周期と同じタイミングでデータ信号の取り込み処理ができるので、データ信号の高速伝送が可能となる。   In the present invention, it takes time for the data signal to pass through the communication cable and the extension unit, and even if there is a time delay between the start of transfer from the PLC body and the return to the PLC body, the data signal having the same cycle as the clock signal Data signals can be captured by processing signals, and even if the number of expansion units increases, data signal capture processing can be performed at the same timing as the clock cycle of the clock signal, enabling high-speed transmission of data signals Become.

本発明によれば、拡張ユニット数が増加しても通信ケーブル内伝送や拡張ユニット内伝送によるデータ信号の時間遅れを自動設定してデータ信号の転送と取り込み処理とを行うことができるようになる。   According to the present invention, even if the number of expansion units increases, it is possible to automatically set the time delay of the data signal due to the transmission within the communication cable or the transmission within the expansion unit, and perform the data signal transfer and capture processing. .

図1は本発明の実施の形態にかかるデータ信号通信方法の実施に用いるPLCのハードウエア構成を示す図である。FIG. 1 is a diagram showing a hardware configuration of a PLC used for implementing a data signal communication method according to an embodiment of the present invention. 図2は図1のPLCにおけるPLC本体内部のハードウエア構成を示す図である。FIG. 2 is a diagram showing a hardware configuration inside the PLC main body in the PLC of FIG. 図3は図1のPLCにおける拡張ユニット内部のハードウエア構成を示す図である。FIG. 3 is a diagram showing a hardware configuration inside the expansion unit in the PLC of FIG. 図4はPLC本体と拡張ユニットとの間を伝送するデータ信号の時間遅れの説明に供する図である。FIG. 4 is a diagram for explaining the time delay of the data signal transmitted between the PLC main body and the extension unit. 図5は本実施の形態のデータ信号通信方法の説明に供するタイミングチャートを示す図である。FIG. 5 is a timing chart for explaining the data signal communication method of this embodiment. 図6は従来例にかかるデータ信号通信方法の実施に用いるPLCのハードウエア構成を示す図である。FIG. 6 is a diagram showing a hardware configuration of a PLC used for implementing the data signal communication method according to the conventional example. 図7は図6のデータ信号通信方法によるデータ信号の遅れ時間の説明に供するタイミングチャートを示す図である。FIG. 7 is a timing chart for explaining the delay time of the data signal by the data signal communication method of FIG. 図8は従来のデータ信号通信方法の説明に供するタイミングチャートを示す図である。FIG. 8 is a timing chart for explaining the conventional data signal communication method. 図9は従来のデータ信号通信方法の説明に供する別のタイミングチャートを示す図である。FIG. 9 is a diagram showing another timing chart for explaining a conventional data signal communication method. 図10は従来のデータ信号通信方法の説明に供するさらに別のタイミングチャートを示す図である。FIG. 10 is a diagram showing still another timing chart for explaining the conventional data signal communication method.

以下、添付した図面を参照して、本発明の実施の形態に係るデータ信号通信方法を説明する。   Hereinafter, a data signal communication method according to an embodiment of the present invention will be described with reference to the accompanying drawings.

図1を参照して、このデータ信号通信方法が適用されるPLCあるいはPLCシステムは、PLC本体10と、複数台の第1−第4拡張ユニット21−24とを含む。これらはRS232C等の第1−第4通信ケーブル31−34により接続されている。図1に示すtx1,tx2,tx3,tx4…は、図6と同様、PLC本体10から各拡張ユニット21−24に送信されるデータ信号Sxの各通信ケーブル31−34内伝送による時間遅れ分でありtd1,td2,td3,td4…も、図6と同様、上記データ信号の各拡張ユニット21−24内伝送による時間遅れ分を示す。これらを合計した時間遅れ分(tx1+tx2+tx3+tx4)+(td1+td2+td3+td4)も、図6と同様に、時間遅れ分tと言うこととする。   Referring to FIG. 1, the PLC or PLC system to which this data signal communication method is applied includes PLC main body 10 and a plurality of first to fourth extension units 21-24. These are connected by first to fourth communication cables 31-34 such as RS232C. 1, tx1, tx2, tx3, tx4... Are time delays due to the transmission of the data signal Sx transmitted from the PLC main body 10 to the respective expansion units 21-24 within the respective communication cables 31-34, as in FIG. .., Td1, td2, td3, td4,... Also indicate the time delay due to the transmission of the data signal in each extension unit 21-24, as in FIG. The total time delay (tx1 + tx2 + tx3 + tx4) + (td1 + td2 + td3 + td4) is also referred to as the time delay t as in FIG.

図2を参照してPLC本体10は、シーケンス制御等の各種制御を行うCPU10aと、CPU10aにより実行されるファームウエアやラダープログラムや通信等の各種のプログラムが格納されるプログラムメモリ10bと、データ記憶ないし作業に用いるメモリ10cと、拡張ユニット21−24との間での通信インターフェース10dと、を含む。   Referring to FIG. 2, the PLC main body 10 includes a CPU 10a that performs various controls such as sequence control, a program memory 10b that stores various programs such as firmware, ladder programs, and communications executed by the CPU 10a, and data storage. Or a memory 10c used for work and a communication interface 10d between the expansion units 21-24.

PLC本体10において、そのCPU10aによるデータ信号の伝送制御は後述するが、CPU10aは、データ信号の拡張ユニット21−24内伝送や通信ケーブル31−34内伝送による遅延時間分だけ、クロック信号と同じ周期のデータ信号処理信号を遅延させて立ち上がらせるステップと、それ以降は上記データ信号処理信号の立ち上がり、立ち下がりタイミングで拡張ユニットから伝送されるデータ信号の取り込み処理と、拡張ユニットへのデータ信号の転送処理とを行うステップと、を実行するようになっている。このステップ実行のためのプログラムはプログラムメモリ10bに格納されている。   In the PLC main body 10, the data signal transmission control by the CPU 10 a will be described later, but the CPU 10 a has the same period as the clock signal by the delay time due to the transmission of the data signal in the extension unit 21-24 and the transmission in the communication cable 31-34. The process of delaying and starting the data signal processing signal of the data signal, the subsequent processing of capturing the data signal transmitted from the expansion unit at the rise and fall timing of the data signal processing signal, and the transfer of the data signal to the expansion unit And a step for performing processing. A program for this step execution is stored in the program memory 10b.

図3を参照して第1拡張ユニット21は、通信制御CPU21aと、CPU21aにより実行されるファームウエアや通信プログラム等のプログラムが格納されるメモリ21bと、PLC本体10や他の第2−第4拡張ユニット22−24との間での通信インターフェース21c、時間遅れ計測タイマ21dと、を含む。   Referring to FIG. 3, the first extension unit 21 includes a communication control CPU 21a, a memory 21b in which programs such as firmware and communication programs executed by the CPU 21a are stored, the PLC main body 10 and other second to fourth. A communication interface 21c between the extension units 22-24 and a time delay measurement timer 21d are included.

第1拡張ユニット21において、その時間遅れ計測タイマ21dは、当該拡張ユニット21内のデータ信号伝送に要する時間を計測するものであり、第1拡張ユニット21にデータ信号の入力に同期して時間遅れの計測動作を開始し、データ信号の出力に同期して時間遅れの計測動作を終了する。この時間遅れ計測タイマ21dにより計測したデータ信号の時間遅れ情報はメモリ21bにセットアップされる。   In the first extension unit 21, the time delay measurement timer 21d measures the time required for data signal transmission in the extension unit 21, and the time delay is synchronized with the input of the data signal to the first extension unit 21. The measurement operation is started, and the time delay measurement operation is terminated in synchronization with the output of the data signal. The time delay information of the data signal measured by the time delay measurement timer 21d is set up in the memory 21b.

第1拡張ユニット21が前段側(この例での前段はPLC本体10)との間に接続される第1通信ケーブル31内を伝送するデータ信号の時間遅れ情報はメモリ21bに記憶されている。この第1通信ケーブル31内での伝送時間遅れ情報は固定情報であり、予め既知の情報である。第1拡張ユニット21のCPU21aは、第1通信ケーブル31が保有する情報の1つとして上記時間遅れ情報をメモリ21bに記憶するようになっている。例えば第1通信ケーブル31から第1拡張ユニット21にはそのケーブル長とデータ信号の周波数やその他の条件に応じたデータ信号の時間遅れ情報が与えられる。   The time delay information of the data signal transmitted through the first communication cable 31 connected between the first extension unit 21 and the front stage side (the front stage in this example is the PLC main body 10) is stored in the memory 21b. The transmission time delay information in the first communication cable 31 is fixed information and is known information in advance. The CPU 21a of the first extension unit 21 stores the time delay information in the memory 21b as one piece of information held by the first communication cable 31. For example, the first communication cable 31 to the first extension unit 21 is provided with time delay information of the data signal according to the cable length, the frequency of the data signal, and other conditions.

第1拡張ユニット21のCPU21aは、他の情報と共にこれら計測した時間遅れ情報と既知の時間遅れ情報とを後段側(この例での後段は拡張ユニット22である)に伝送する。   The CPU 21a of the first extension unit 21 transmits the measured time delay information and known time delay information together with other information to the rear stage (the rear stage in this example is the extension unit 22).

以上から、第1拡張ユニット21は、前段側であるPLC本体10からのデータ信号を受信するステップと、受信したデータ信号に対して自身内伝送に要する時間遅れを計測するステップと、上記計測した自身内伝送による時間遅れ情報を自身内部のメモリ21bに遅延情報としてセットアップするステップと、受信したデータ信号に対してPLC本体10との間に接続された通信ケーブル31内伝送による既知の時間遅れ情報と、上記計測した自身内伝送による時間遅れ情報とを後段側である第2拡張ユニット22に伝送するステップと、を実行するようになっている。このステップ実行のプログラムはメモリ21bに格納されている。   From the above, the first extension unit 21 receives the data signal from the PLC main body 10 which is the front stage side, measures the time delay required for the transmission within itself with respect to the received data signal, and performs the above measurement. Setting up time delay information due to transmission within itself as delay information in its own memory 21b, and known time delay information due to transmission within the communication cable 31 connected between the PLC body 10 with respect to the received data signal And the step of transmitting the measured time delay information due to the transmission within itself to the second extension unit 22 on the rear stage side. This step execution program is stored in the memory 21b.

他の第2−第4拡張ユニット22−24もその内部構成の図示を略するが、第1拡張ユニット21と同様の構成である。   The other second to fourth extension units 22-24 are not shown in their internal configurations, but have the same configuration as the first extension unit 21.

図1ないし図3を参照してデータ信号Sxの時間遅れ情報を説明する。PLC本体10からデータ信号Sxが第1通信ケーブル31内を時間tx1かかって第1拡張ユニット21に入力される。第1拡張ユニット21は自身の通信インターフェース21cを介してデータ信号Sxを入力し、CPU21aの制御によりこのデータ信号Sxの入力に応答して時間遅れ計測タイマ21dをスタートさせる。データ信号Sxは第1拡張ユニット21内でCPU21aにより処理されてから通信インターフェース21cを介して第2通信ケーブル32に出力される。このとき、CPU21aは時間遅れ計測タイマ21dの時間遅れ計測タイマ動作を終了させる。このときの時間遅れ計測タイマ21dの計測値はデータ信号Sxが第1拡張ユニット21に入力してから出力されるまでの値であって、第1拡張ユニット21内でのデータ信号Sxの伝送時間遅れ情報となる。そしてデータ信号Sxが拡張ユニット21内を伝送するときの時間遅れ情報(拡張ユニット内時間遅れ情報)はメモリ21bにセットアップされて記憶される。そしてデータ信号Sxは第1拡張ユニット21で処理された処理情報と上記両時間遅れ情報とを含んで第2拡張ユニット22に伝送される。   The time delay information of the data signal Sx will be described with reference to FIGS. A data signal Sx is input from the PLC main body 10 to the first extension unit 21 in the first communication cable 31 over time tx1. The first extension unit 21 receives the data signal Sx via its own communication interface 21c, and starts the time delay measurement timer 21d in response to the input of the data signal Sx under the control of the CPU 21a. The data signal Sx is processed by the CPU 21a in the first extension unit 21 and then output to the second communication cable 32 via the communication interface 21c. At this time, the CPU 21a ends the time delay measurement timer operation of the time delay measurement timer 21d. The measured value of the time delay measurement timer 21d at this time is a value from when the data signal Sx is input to the first expansion unit 21 until it is output, and the transmission time of the data signal Sx within the first expansion unit 21 It becomes delay information. Then, the time delay information when the data signal Sx is transmitted in the extension unit 21 (time delay information in the extension unit) is set up and stored in the memory 21b. The data signal Sx is transmitted to the second extension unit 22 including the processing information processed by the first extension unit 21 and the time delay information.

第2拡張ユニット22以降においても、説明を略するが第1拡張ユニット21と同様にデータ信号Sxは処理されて伝送され、最終的にはPLC本体10に伝送される。   In the second and subsequent expansion units 22 and later, although not described, the data signal Sx is processed and transmitted in the same manner as the first expansion unit 21 and finally transmitted to the PLC main body 10.

図4のテーブルに以上の伝送情報に関しての時間遅れ情報と伝送情報とを示す。図4のテーブルには、各拡張ユニット21−24ごとにメモリにセットアップされる時間遅れ情報td1−td4と、後段に伝送される伝送情報とを示す。処理情報は示していない。伝送情報に関して、第1拡張ユニット21から第2拡張ユニット22に拡張ユニット内伝送による時間遅れ情報td1と通信ケーブル31内伝送による時間遅れ情報tx1とが伝送され、後段へ伝送されるに伴い、その伝送情報量は図4のテーブルに示すように増える。   The table of FIG. 4 shows time delay information and transmission information regarding the above transmission information. The table of FIG. 4 shows time delay information td1-td4 set up in the memory for each extension unit 21-24 and transmission information transmitted to the subsequent stage. Processing information is not shown. Regarding the transmission information, the time extension information td1 due to the transmission within the expansion unit and the time delay information tx1 due to the transmission within the communication cable 31 are transmitted from the first extension unit 21 to the second extension unit 22 and are transmitted to the subsequent stage. The amount of transmission information increases as shown in the table of FIG.

以上からPLC本体10には各拡張ユニット21−24それぞれでの処理情報と共に前記した時間遅れ情報tx1−tx4,td1−td4が伝送される。PLC本体10は、上記伝送された時間遅れ情報によりデータ信号Sxの転送ならびに取り込み処理を図5で示すように制御する。   From the above, the time delay information tx1-tx4, td1-td4 is transmitted to the PLC main body 10 together with the processing information in each of the expansion units 21-24. The PLC main body 10 controls the transfer and capture processing of the data signal Sx as shown in FIG. 5 based on the transmitted time delay information.

PLC本体10は、上記時間遅れ情報tx1−tx4,td1−td4から全体の時間遅れを上記したように時間遅れ分tと定めることができる。   The PLC main body 10 can determine the total time delay as the time delay t as described above from the time delay information tx1-tx4, td1-td4.

以下、図5を参照して上記データ信号Sxの転送ならびに取り込み処理を説明する。まず、PLC本体10では図5(a)で示すように、クロック幅twのクロック信号CLK1,CLK2,CLK3,…によりデータ信号の転送を制御する。これらクロック信号の立上り期間と、立下り期間は共に同じtwである。図5(b)で示すように、時刻t0でPLC本体10から通信ケーブル31を介してデータ信号S1がまず第1拡張ユニット21に転送される。このデータ信号S1は各第2−第4拡張ユニット22−24内を転送されていき、最終段の第4拡張ユニット24にまで転送された後は、再び、拡張ユニット内を戻されて、PLC本体10に時刻t2で受信される。この時刻t2で受信したデータ信号S1は上記説明したと同様の理由でデータ信号S1aと称する。データ信号S1は上記時間遅れ情報で設定した時間遅れ分t後にPLC本体10に受信されてデータ信号S1aとして取り込み処理される。他のデータ信号S2、S2a、S3,S3a,…も同様である。なお、時間遅れ分tとクロック信号のパルス幅twとの間には時間差Δtがある。ここで、クロック信号のクロック幅は上述したように既定時間であり、時間差Δtはデータ信号Sの既定時間からの時間遅れである。   Hereinafter, the transfer and capture processing of the data signal Sx will be described with reference to FIG. First, as shown in FIG. 5A, the PLC main body 10 controls data signal transfer by using clock signals CLK1, CLK2, CLK3,... Having a clock width tw. The rising period and the falling period of these clock signals are the same tw. As shown in FIG. 5B, the data signal S1 is first transferred from the PLC main body 10 to the first extension unit 21 via the communication cable 31 at time t0. The data signal S1 is transferred through each of the second to fourth extension units 22-24, and after being transferred to the fourth extension unit 24 at the final stage, the data signal S1 is returned to the extension unit again to be connected to the PLC. It is received by the main body 10 at time t2. The data signal S1 received at time t2 is referred to as a data signal S1a for the same reason as described above. The data signal S1 is received by the PLC body 10 after the time delay t set by the time delay information, and is taken in as the data signal S1a. The same applies to the other data signals S2, S2a, S3, S3a,. There is a time difference Δt between the time delay t and the pulse width tw of the clock signal. Here, the clock width of the clock signal is the predetermined time as described above, and the time difference Δt is a time delay from the predetermined time of the data signal S.

本実施形態では、図5(c)で示すように、PLC本体10は、上記データ信号S1,S2,S3,…のうち、最初のデータ信号S1の転送開始時刻t0から時間差Δtが経過してからクロック信号CLK1のパルス幅twと同じパルス幅のデータ信号処理信号P1を立ち上がらせる。この場合、データ信号処理信号P1の半周期はクロック信号CLK1のそれに等しく、データ信号処理信号P1のデータ信号取り込みのための位相は立ち上がり開始が0度となり、立ち下がり開始が180度となり、位相的には、時間差Δt分を補償されることとなる。   In the present embodiment, as shown in FIG. 5 (c), the PLC body 10 determines that the time difference Δt has elapsed from the transfer start time t0 of the first data signal S1 among the data signals S1, S2, S3,. To rise the data signal processing signal P1 having the same pulse width as the pulse width tw of the clock signal CLK1. In this case, the half cycle of the data signal processing signal P1 is equal to that of the clock signal CLK1, and the phase for capturing the data signal of the data signal processing signal P1 is 0 degrees at the rising start and 180 degrees at the falling start. Therefore, the time difference Δt is compensated.

そして、PLC本体10は、上記データ信号処理信号P1に続けて、データ信号処理信号P1と同じパルス幅twのデータ信号処理信号P2,P3,…を生成すると共に、これらデータ信号処理信号P1,P2,P3,…によりデータ信号S1a,S2a,S3a,…の取り込み処理を行う。   Then, the PLC body 10 generates the data signal processing signals P2, P3,... Having the same pulse width tw as the data signal processing signal P1 following the data signal processing signal P1, and the data signal processing signals P1, P2 , P3,..., Data signals S1a, S2a, S3a,.

データ信号S1a,S2a,S3a,…は、それぞれ、上述したように、データ信号S1,S2,S3,…と同じ内容の信号であって、PLC本体10から拡張ユニット21−24に転送開始されたデータ信号S1,S2,S3,…に対して時間遅れ分tをもってPLC本体10で受信されて取り込み処理される信号である。   The data signals S1a, S2a, S3a,... Are signals having the same contents as the data signals S1, S2, S3,..., Respectively, and have been transferred from the PLC body 10 to the expansion unit 21-24. Is a signal that is received and processed by the PLC body 10 with a time delay t with respect to the data signals S1, S2, S3,.

すなわち、本実施の形態では、データ信号が通信ケーブル内通過および拡張ユニット内通過に時間を要し、PLC本体から転送開始されてPLC本体に戻るまでに時間遅れがあっても、クロック信号と同じ周期のデータ信号処理信号によりデータ信号を取り込み処理することができるので、拡張ユニット数が増加してもデータ信号の高速伝送が可能となる。   That is, in the present embodiment, it takes time for the data signal to pass through the communication cable and the extension unit, and even if there is a time delay between the start of transfer from the PLC main body and the return to the PLC main body, it is the same as the clock signal. Since the data signal can be captured and processed by the periodic data signal processing signal, the data signal can be transmitted at high speed even when the number of expansion units is increased.

10 PLC本体
21−24 第1−第4拡張ユニット
31−34 第1−第4通信ケーブル
10 PLC main body 21-24 1st-4th expansion unit 31-34 1st-4th communication cable

Claims (2)

PLC本体から通信ケーブルを介して順次に複数の拡張ユニットにデータ信号をクロック信号に同期して転送すると共に、転送し終えてPLC本体に戻るデータ信号を当該PLC本体で取り込み処理を行うリングデータ通信方式によるデータ信号送受信方法において、
各拡張ユニットは、
前段側からデータ信号を受信するステップと、
受信したデータ信号に対して自身内伝送に要する時間遅れを計測するステップと、
上記計測した自身内伝送による時間遅れ情報を自身内部のメモリに遅延情報としてセットアップするステップと、
受信したデータ信号に対して前段側との間に接続された通信ケーブル内伝送による既知の時間遅れ情報と、上記計測した自身内伝送による時間遅れ情報とを後段側に伝送するステップと、
を実行し、
PLC本体は、
少なくとも前記拡張ユニットから伝送される上記両時間遅れ情報に含む時間遅れ分だけ、クロック信号と同じ周期のデータ信号処理信号を遅延させて立ち上がらせるステップと、
それ以降は上記データ信号処理信号の立ち上がり、立ち下がりタイミングで拡張ユニットから伝送されるデータ信号の取り込み処理と、拡張ユニットへのデータ信号の転送処理とを行うステップと、
を実行する、
ことを特徴とするデータ信号送受信方法。
Ring data communication in which a data signal is sequentially transferred from a PLC main body to a plurality of expansion units via a communication cable in synchronization with a clock signal, and a data signal that has been transferred and returned to the PLC main body is captured by the PLC main body. In the data signal transmission / reception method by the method,
Each expansion unit
Receiving a data signal from the preceding stage; and
Measuring the time delay required for transmission within the received data signal;
Setting up the time delay information due to the measured internal transmission as delay information in its own internal memory;
Transmitting the known time delay information by transmission within the communication cable connected between the preceding stage and the received data signal to the subsequent stage, and the time delay information by the measured transmission within itself, to the subsequent stage,
Run
The PLC body is
A step of delaying and starting the data signal processing signal having the same cycle as the clock signal by a time delay included in at least both the time delay information transmitted from the extension unit;
Thereafter, a step of performing a process of taking in the data signal transmitted from the expansion unit at the rising and falling timing of the data signal processing signal, and a process of transferring the data signal to the expansion unit,
Run the
A data signal transmission / reception method.
前記計測時間遅れ情報が、該拡張ユニット内保有の時間遅れ計測タイマにより計測した時間遅れ情報である、請求項1に記載の方法。   The method according to claim 1, wherein the measurement time delay information is time delay information measured by a time delay measurement timer held in the extension unit.
JP2010055831A 2010-03-12 2010-03-12 Data signal transmission and reception method Pending JP2011191874A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010055831A JP2011191874A (en) 2010-03-12 2010-03-12 Data signal transmission and reception method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010055831A JP2011191874A (en) 2010-03-12 2010-03-12 Data signal transmission and reception method

Publications (1)

Publication Number Publication Date
JP2011191874A true JP2011191874A (en) 2011-09-29

Family

ID=44796750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010055831A Pending JP2011191874A (en) 2010-03-12 2010-03-12 Data signal transmission and reception method

Country Status (1)

Country Link
JP (1) JP2011191874A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105527918A (en) * 2015-12-11 2016-04-27 中山联合光电科技股份有限公司 Method for realizing one-way single-wire communication between two PLCs through I/O port
JP2018173710A (en) * 2017-03-31 2018-11-08 オムロン株式会社 Control device, control program, and control system
WO2019176287A1 (en) * 2018-03-13 2019-09-19 オムロン株式会社 Control device, control system, control method, and control program
CN114882718A (en) * 2021-12-03 2022-08-09 鸿海精密工业股份有限公司 Device and vehicle suitable for V2X system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105527918A (en) * 2015-12-11 2016-04-27 中山联合光电科技股份有限公司 Method for realizing one-way single-wire communication between two PLCs through I/O port
JP2018173710A (en) * 2017-03-31 2018-11-08 オムロン株式会社 Control device, control program, and control system
US10908579B2 (en) 2017-03-31 2021-02-02 Omron Corporation Controller, control program, and control system
WO2019176287A1 (en) * 2018-03-13 2019-09-19 オムロン株式会社 Control device, control system, control method, and control program
US11251990B2 (en) 2018-03-13 2022-02-15 Omron Corporation Control device, control system, control method, and non-transitory storage medium storing control program
CN114882718A (en) * 2021-12-03 2022-08-09 鸿海精密工业股份有限公司 Device and vehicle suitable for V2X system

Similar Documents

Publication Publication Date Title
EP3309647B1 (en) Control device and communication device
US8862925B2 (en) Pseudo synchronous serial interface synchronization method
US9906320B2 (en) Industrial network apparatus and data communication method
US20140115229A1 (en) Method and system to reduce system boot loader download time for spi based flash memories
KR20100080191A (en) Apparatus and method for controlling synchronization between slave devices connected to network
JP2011191874A (en) Data signal transmission and reception method
CN107947888A (en) A kind of task level synchronous method based on network service
US8581654B2 (en) Method of compensating clock skew, clock skew compensating circuit for realizing the method, and input/output system including the clock skew compensating circuit
JP6331691B2 (en) Synchronization control device and synchronization control method
KR101669397B1 (en) Distance measurement device and distance measurement method
JP6400553B2 (en) Numerical control system with synchronous control function between units
JP2011191873A (en) Data signal transmission and reception method
JP2016005380A (en) Multiplexing system for power converter
WO2021241220A1 (en) Communication device, communication method, and program
JP2006340371A (en) Method and communication module for controlling access time to system bus
JP5877310B2 (en) Master / slave synchronous communication system
CN110221996B (en) Controller configuration method and device in main control chip
JP6018040B2 (en) Clock supply system, clock buffer group and control method
KR101454802B1 (en) Asynchronous Pipeline System, Stage and the Data Transfer Mechanism
JP2018042115A (en) Communication system
JP6496278B2 (en) Simulation system
JP2007228462A (en) Slave unit
JP2020101995A (en) Control system and control apparatus
JP5434677B2 (en) Communication control device and communication control method
JP4661743B2 (en) Motor drive device