modscan32 scripting

D

Thread Starter

Deepak Bhopatkar

I am a newbie to Modbus as well as Modscan32. I am writing test script for modbus slaves. Write register from script below works, however Read multiple Holding Register with verification of data returned in the script below does not work. Please help me locate problem with the Read script line. I have tried to adhere to modscan example script format.

//my write and read modscan32 script
write register,1,6,38,1,3000,R
write register,1,6,37,1,40,R
Read register,1,3,37,2,40,3000,T
end

Thanks in advance.

Deepak Bhopatkar
dbhopatkar [at] lexon.in
 
<b>Moderator's Note:</b> Please copy and paste text to see entire script.





<pre>//
// Run a script file within the Software ModScan32 V8.A00-10 Autor: SR/GER 27.Oct.2015
// Copy this complete article into a .csv file ==> it is running
//
// Open the programm ModScan32 #menubar# Setup => Extended => Run Script
// Use the file browser to open a script file
// Type the button "Loop" to open the menu "Test Loop Control"
// Activate here the "Loop Continuously" and "Time Delay" with e.g 1000ms.
// Then the script will be run continuously and stepwise (e.g. 1000ms) through the script.
// Leave this menu with "OK"
// If this configurartion inside the menu "Test Loop Control" takes to long (~5sec.)
// a dialog window, with the info "TCP/IP Connection Terminated!", will pop up.
//
// In this case you have to reconnect the Modbus simulation and open the script file again, ...
//
// #########################################################################################################
// EXAMPLE # Write the Holdingregister 601 (Address 600) to address 2 with the value 100,200,300
//
// Logic: NAME (Any), NODE (Device address), FUNCTIONCODE, STARTADDRESS, LENGTH, DATA, CONTROL CODE
//
Alive Counter,2,16,601,1,100,
Alive Counter,2,16,601,1,200,
Alive Counter,2,16,601,1,300,T
end</pre>
 
Top