Menggunakan Harmony Edge Box / IoT Box sebagai Modbus Gateway (TCP to RTU)

Magelis Edge Box (sekarang berubah menjadi Harmony Edge Box) adalah sebuah Computer dengan ukuran mini dengan kebutuhan khusus dan di design dengan spesifikasi industrial. belakangan lebih sering disebut sebagai IoT Box karena kebanyakan digunakan sebagai bridge ke IoT. lebih lengkapnya dapat di cek diwebsite Schneider Electric:

Kali ini saya akan membahas bagaimana menggunakan IoT Box terutama untuk yang versi Linux, untuk digunakan sebagai gateway Modbus TCP ke Modbus Serial. menggunakan NodeRED

Cara update Node-RED OEM
Cara Update Node-RED pre-installed (OEM) contoh kasus pada software Ecostruxure Augmented Operator Advisor (AOA) by Schneider Electric.
Update Node.js

- update Node.JS bisa mendownload dari https://nodejs.org jangan di install, tapi kalau bisa di extract saja, kemudian cari file Node.exe
- copy file tersebut ke lokasi node.exe oem (replace)
Update NPM
setelah node.js di update, maka selanjutnya kita bisa otomatis update NPM ke versi terbaru (terkoneksi internet) caranya:

- buka command prompt, kemudian masuk ke folder installasi nodejs OEM untuk kasus ini ada di: C:\Program Files (x86)\Schneider Electric\EcoStruxure Augmented Operator Advisor\node-red
- kemudian ketik:
npm install npm@latest -g
Update Node-RED
Setelah update Node.js dan NPM, maka selanjutnya kita bisa mengupdate Node-RED itu sendiri ke versi yang terbaru. caranya cukup ketik:
npm install -g –unsafe-perm node-red
di folder yang sama dengan sebelumnya
Surge Detection on Process Value – Unity Pro / Control Expert
Berikut adalah cara mendeteksi lonjakan perubahan di process value yang terjadi tiba-tiba. misal ketika perubahan pressure yang terjadi tiba-tiba dalam kurun waktu tertentu.

Cara Install NODE-RED di Windows
Cara install Node-RED di Operating System Windows adalah sebagai berikut:

- Download NODEJS dari nodejs.org kemudian pilih operating system Windows dan “.msi” installer
Node-Red ~ Modbus Floating Point Convert (Float32 / Real)

this function script is used to convert your 2 words into Float32bit
/* Converts from an number, string, buffer or array representing an IEEE-754 value
to a javascript float.
The following may be given in msg.payload:
A string representing a number, which may be hex or binary
examples, "1735" "0x02045789" 0b01000000010010010000111111011011
An integer value
A two element array or buffer of 16 bit values, less significant byte first.
A four element array or buffer of 8 bit values, most significant byte first.
Source: https://flows.nodered.org/flow/359ead34237b7ab6ec0465ee85a34b62
*/
// first make a number from the given payload if necessary
let intValue;
if (typeof msg.payload === "number")
{
intValue = msg.payload;
} else if (typeof msg.payload === "string") {
intValue = Number(msg.payload);
} else if (msg.payload.length == 2) {
// two int array or buffer
intValue = (msg.payload[1] << 16) + msg.payload[0];
} else if (msg.payload.length == 4) {
// four byte array or buffer
intValue = (((((msg.payload[0] << 8) + msg.payload[1]) << 8) + msg.payload[2]) <<
8) + msg.payload[3];
} else {
node.warn("Unrecognised payload type or length");
}
msg.payload = Int2Float32(intValue);
msg.payload = msg.payload.toFixed(1);
return msg;
function Int2Float32(bytes) {
var sign = (bytes & 0x80000000) ? -1 : 1;
var exponent = ((bytes >> 23) & 0xFF) - 127;
var significand = (bytes & ~(-1 << 23));
if (exponent == 128)
return sign * ((significand) ? Number.NaN : Number.POSITIVE_INFINITY);
if (exponent == -127) {
if (significand === 0) return sign * 0.0;
exponent = -126;
significand /= (1 << 22);
} else significand = (significand | (1 << 23)) / (1 << 23);
return sign * significand * Math.pow(2, exponent);
}
Offline / Online changes M580 Redundant without shutdown
Halo,

Saya mau sedikit menjelaskan bagaimana sebenarnya prosedur untuk melakukan perubahan program secara online ataupun offline pada PLC M580 Redundant tanpa harus menyebabkan Downtime/Shutdown.
READ MORE
Modbus-IoT (Modbus over MQTT)
Modbus?? old school protocol (more than 40th years).

when Modbus created, it was created for Serial communication via RS485. after year by year, technology was changing and ethernet / TCP widely used in PLC and industrial control system, then Modbus move their medium to Ethernet and wrap their message in TCP (encapsulated) over ethernet.
Now, when everything going to the cloud or RTU/PLC are not in the same place with SCADA and it only have internet connection, it will be hard and expensive for Modbus to keep exist in Internet area. because we need at least public IP for each device, or creating VPN.
but with MQTT the message can be send over the broker (on the cloud), so it will be exiting if modbus can be sent through MQTT.
if you’ve heard about Node-red this is cool IoT tools/platform built in NodeJS.
I’m using Node-red to make it’s encapsulation, and Modscan as Modbus Master (or SCADA), and Modsim as Modbus Slave (or PLC)


MQTT – IoT Protocol with Node-Red
MQTT tutorial – Node-Red
Broker+Client HiveMQ : http://www.hivemq.com/demos/websocket-client/
Local Client : Node-Red
Video Tutorial – Ion7650 Power Meter reading from Citect SCADA
Cara membaca nilai ION7650 power logic ke SCADA CitectSCADA 2016. melalui Ethernet (Modbus TCP)
Citect SCADA, Ion powermeter
HMI GTU (HMIG3U) Recovery
If your HMIG3U Magelis runtime just crash and Halt you can recover only using SDcard by using this tool “BackupRecovery” you can download from this link:
https://schneider-electric.box.com/s/c6ray49otwvj1p3ugyq66b3kx76lsqzc
and image recover HMIG3U VJD 6.2 SP 5.1 :
https://schneider-electric.box.com/s/pxquf8r3d507k01od8w8l1rnowv8nj8m
and here is the official tutorial from schneider electric, the different thing is only version of image. if you are using newer version you can’t recover to the previous version so I created the newest version:
Vijeo Designer Project Data – Default Path
Halo,
Jika kita sudah pernah menggunakan Vijeo Designer, pasti sudah sangat familiar dengan cara Save Project yang agak sedikit berbeda dengan software seperti microsoft excel atau software pada umumnya. jika kita melakukan penyimpananan pada software apapun, normalnya kita akan ditawarkan untuk menyimpan di lokasi tertentu, namun berbeda dengan Vijeo Designer yang menyimpan ke lokasi default nya, yang mungkin kita butuhkan. walaupun sebenarnya kita dapat melakukan backup/Export kemudian barulah kita dapatkan file backup berupa *.VDZ ada kalanya kita butuh backup project nya secara langsung dari folder defaultnya, dimanakah folder tersebut?
berikut adalah lokasi default Vijeo Designer 6.2 :
C:\Users\Public\Documents\Vijeo-Designer 6.2\Vijeo-Manager
Vijeo Designer Basic 1.1:
C:\Users\Public\Documents\Vijeo-Designer Basic 1.1
Magelis, Vijeo Designer, Vijeo Designer Basic, Schneider Electric
Citect SCADA / Vijeo Citect to SQL With CiCode
Jika anda membutuhkan sebuah data logger dari Citect SCADA / vijeo citect ke SQL misal Ms SQL Server, atau anda ingin melalukan sejumlah sampling data dari Citect SCADA / Vijeo Citect ke database, berikut video solusinya:
Cara logging data Citect SCADA ke SQL, Citect to SQL
Modicon M580 – ePAC pertama
Modicon M580 Merupakan ePAC (Ethernet Process Automation Controller) yang di desain compact dan memenuhi kebutuhan untuk medium offer atau skala menengah di Proses Automation.
Fitur Utama: Integrated Distributed IO dan atau Integrated Distributed IO
Kapasitas CPU Discrete IO : 1024, 2048, 3072, 4096
Kelebihan lain:
Achieve a more productive and efficient process
By embedding standard unmodified Ethernet right into its core, Modicon M580 offers you more transparency, flexibility and openness so you can access the right production information at the right time, and achieve a more productive and efficient process.
Performant:
- Data management speed up to twice
- Timestamping less than 1 millisecond
Innovative:
- Open Ethernet backbone
- High-tech PAC
- High precision
- Safety designed for future
- Energy efficiency enabling
- Cyber secure built-in
Easy and flexible:
- Design your architecture without constraints
- Modify your process and architecture in run
- Diagnose remotly
- Reduce your development costs
Sustainable:
- Secure investments
Water Tank PLC Control Simulation with Matlab Simulink
httpvh://youtu.be/Uz827S7tjRU
To play this simulation you need to have this item:
- Unity PRO S (minimum) / Unity Pro L /Unity Pro XL. Version 5 / 6 / 7 / 8 (I’m not provide the installer, you can find on another forum 1.5 Gb)
- Matlab 2012 / Matlab 2013 with simulink (I’m not provide the installer, you can find on another forum 6.5Gb)
- Modbus Ehternet OPC Server (Iconics) http://adf.ly/lA1Gt this is free OPC server, you don’t need to license the software
- Simulink Model, OPC Configuration(should be load from iconics modbus OPC Server) http://adf.ly/lA205