08-18-2008 08:27 AM - edited 08-18-2008 08:31 AM
Hi All,
I have a problem while programaticaly binding the shared variable from RT controller.
The application scenario is as follows
I have three cFP controllers and two server PCs in my application. Servers are implemented with Redundancy. If server 1 fails, server 2 will take care and vice versa. The cFP controller program is intelligent enough to detect this switching and identify the active server.
I am using shared variable communication for transferring the data between cFP and Active Server. This I am achieving by binding the cFP variable to Server variables. I can bind server variables to cFP variables also. But I have some advantage with first one rather than second one.
Now, cFP Variable to Server Variable binding I can do in two ways.
Right click the variable in Project Explorer and select the network URL.
Other method is by programmatic binding.
Now Programatic binding should be done in cFP controller since cFP controller should bind to second server whenever it detects switching.
For this, I tried with SharedVariableIO property node like in the below attached diagram 1.
But I was getting a deployment error shown in attached diagram 2.
The second method I tried is by transferring a shared variable library cFP Library.lvlib to cFP through FTP and opening the Library variable reference and by using the variable property node. This way of binding was successful when I run from windows PC. But in RT controller, it was giving me Error 1 while opening a library.
I am attaching the code with this post
Summary of the problem is I am not able to progmatically bind variables from RT Controllers
Kindly help me in solving this problem.
Regards,
Blackperl