Visualize then Realize (TM)
20 01, 2020

Fill DOCX with XML data using Powershell

2020-02-20T04:38:04+01:00Gennaio 20th, 2020|Programming|

Fill DOCX with XML data using Powershell Given a Microsoft DOCX document ("template") sprinkled with @@<tag> constructs, and, XML data that includes elements <tag>, the script below makes a copy of template and replaces, preserving style, the @@<tag> occurances with the XML element contents. The XML data may be [...]

28 02, 2019

RS485 Modbus RTU relay board with PowerShell

2019-03-13T17:06:27+01:00Febbraio 28th, 2019|Programming|

RS485 Modbus RTU relay board with PowerShell Serial comunication with a 4 Channel RS485 Modbus RTU relay board via a universal USB - RS485 dongle using PowerShell. Relevant links: https://unserver.xyz/modbus-guide/ https://www.tanzolab.it/R41A08 https://github.com/Erriez/R421A08-rs485-8ch-relay-board Write-Host "Available ports:" ([System.IO.Ports.SerialPort]::getportnames()); $COM = "COM4"; $SLAVE_ID = 0x03; # Append 2 byte MODBUS-16 CRC [...]

Torna in cima