Tuesday 13 October 2015

Switch Topic RsLinx

Jika anda sering atau pernah menggunakan RsLinx, anda mungkin tahu bahwa setiap koneksi PLC bisa dibuat menjadi sebuah Topic, dan bila koneksi ke PLC lebih dari satu maka bisa dibuat Aliased Topic. RsLinx akan membaca nilai-nilai dari PLC melalui Topic yang menjadi prioritas, jika koneksi tersebut bermasalah maka secara otomatis RsLinx akan mengganti (switch) Topic ke Topic yang lain yang tidak bermasalah.
If you are or have ever used RsLinx, you probably know that each PLC connection can be made into a Topic, and if the connection to the PLC is more than one then it could be made an Aliased Topic. RsLinx will read values from the PLC via the priority Topic, if the connection is problematic then automatically RsLinx will replace (switch) Topic to the other Topic were not problematic.

Namun kami mengalami kondisi dimana RsLinx tidak berhasil melakukan Switch Topic secara otomatis, mungkin karena status koneksi masih terbaca normal padahal nyatanya sedang masalah. Oleh karena itu kami membuat aplikasi sederhana untuk memaksa RsLinx agar melakukan Switch Topic.
But we encounter situations where RsLinx not successfully switch Topic automatically, perhaps because of the connection status still reads normal but in fact was a problem. Therefore we made a simple application to force RsLinx to conduct Switch Topic.

Form dari aplikasi SwitchTopic kami desain seperti ini:
The form of Switch Topic application is something like this:

Namun, kami ubah programnya, agar saat aplikasi dijalankan langsung membaca file text yang berisi Aliased Topic yang akan di-switch.
Perintah SwitchTopic dibaca dari file text yang ditentukan di sourcecode, seperti tampak berikut:
However, we changed the program, so that when the application is run directly read a text file that contains aliased Topic to be switched.
SwitchTopic command read from the specified text file in the source code, as shown below:


Anda perlu mengubah sourcecode nya untuk menyesuaikan dengan kebutuhan anda. Beberapa sourcecode lain mungkin perlu anda ubah juga dan sesuaikan dengan kebutuhan anda.
Perintah Switch Topic sebenarnya adalah melakukan pembacaan asinkron ke tag "@SwitchTopic" yang terdapat di OPC Server RsLinx, seperti tampak pada sourcecode berikut:
You need to change the source code to fit your needs. Some other source code you may need to change as well and adjust to your needs.
Topic Switch command is actually doing the reading asynchronous to the tag "@SwitchTopic" contained in OPC Server RsLinx, as shown in the following source code:



Silahkan download source projeknya disini.
Please download source project here.

0 komentar:

Post a Comment

 
Copyright © . HadiSCADA - Posts · Comments
Theme Template by BTDesigner · Powered by Blogger