Sign in to follow this  
Followers 0
Veganic

Syncronising two variables

14 posts in this topic

I have a variable, A. I want to be able to edit this variable in two places, X and Y. X and Y are connected by CC link. How do I do it? Edit : I meant synchronising Edited by Veganic

Share this post


Link to post
Share on other sites
Hi, I did solve the similar task for Profibus-DP network. It can be done with "change" bit which has to be set simultaneously with change of variable value. The specific decision depends on type of X and Y remote device (an example, HMI is connected directly to CC-Link or HMI is connected to network via PLC, etc).

Share this post


Link to post
Share on other sites
So it can be done! How is the "change bit" reset after updating the variable? Would the following work? The system is HMI <-> Q plc <- CC link-> FXplc <-> HMI. DY from Q to DX in FX. DY from FX to DX in Q. Change D on HMI. FX monitors the difference between D and DY and/or DX. DY in FX is updated and change bit is set. Q recieves the change bit and sets DY = DX and D on HMI = DY. Q sends "change accepted" bit. FX resets the "change bit" on receiving the "change accepted" bit. Q reset the "change accepted" bit when the "change bit" goes off. All registers should now have the same value. Repeat for the Q plc and decide that if both are changed at the same time the Q takes precedence!

Share this post


Link to post
Share on other sites
Some not. This bit breaks the connection between the DX and DY in the PLC, which made dubbing (PLC1) and prohibits the change of variable from HMI in the opposite controller until the cycle DY-DX-DY-DX is not finished and DX will be equal again to DY in PLC1. Thus no one PLC will not have priority.

Share this post


Link to post
Share on other sites
Like this? Q plc: [<> Dhmi Dx]---(Qchange) Qchange -|\|-[Mov Dx Dy] Qchange -| |-[Mov Dhmi Dy] FXchange -| |-[Mov Dx Dhmi] ----------------------------------------------------- FX plc: [<> Dhmi Dx]---(FXchange) FXchange -|\|-[Mov Dx Dy] FXchange -| |-[Mov Dhmi Dy] Qchange -| |-[Mov Dx Dhmi] ------------------------------------------------------- And inhibit changes on HMIs as necessary.

Share this post


Link to post
Share on other sites
You can do without Dhmi and "tie" the value in HMI to DY directly. Also you can use "off" active state of change bit, because initially the variable value must be synchronized with one of PLC: An example, the initial sinchronization with Q. Set Change bit in FX (change is absent) DY Q --> DX FX --> DY FX --> DX Q If DX Q = DY Q set Change bit in Q. When new value is being written from HMI, simultaneously the appropriate bit must be reset from this HMI (without PLC program code!). Edited by Inntele

Share this post


Link to post
Share on other sites
So I think it becomes: Q plc: [<> Dy Dx]---(Qchange) Qchange -|\|-[Mov Dx Dy] ----------------------------------------------------- FX plc: [<> Dy Dx]---(FXchange) FXchange -|\|-[Mov Dx Dy] ------------------------------------------------------- And inhibit changes on HMIs as necessary.

Share this post


Link to post
Share on other sites
Veganic, see information which was added in my previous post. In each PLC must be following: = DX DY OR First Scan (M8002 for FX, SM402 for Q) SET Change Bit Edited by Inntele

Share this post


Link to post
Share on other sites
I haven't tried it yet but I think I've over-simplified the problem. Without Dhmi I can't discrimiate between a change in Dx and a change in DY. It will work if I set "change bit" in the HMI simutaneously, as you suggest, but how? A macro?

Share this post


Link to post
Share on other sites
I don't know, what HMI do you use (from Beijer or from Mitsubishi, or from the third party). For E-series/E1000-series it may be to do either without macro (this is typical function for tag in E-designer), or with macro.

Share this post


Link to post
Share on other sites
Sorry. I've checked, unlike E-Designer v7.20, where I did it, in v7.50 is impossible to set/reset/momentary a bit only according to input of new value. Therefore now is need to organize it in PLC.

Share this post


Link to post
Share on other sites
Thanks, I think I have the solution now.

Share this post


Link to post
Share on other sites
OK. I also think, it is time to move from words to deeds

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0