importjsonfromchamberconnectlibrary.watlowf4importWatlowF4#example interface_params for RS232/RS485 on port 7 (windows) Modbus address=1interface_params={'interface':'RTU','baudrate':19200,'serialport':'//./COM3','adr':1}controller=WatlowF4(profiles=True,limits=[1],**interface_params)#bare minumum to setup the controller.printcontroller.process_controller()#This call will automatically detect the correct loop configuration.#Determine the correct number of "standard" loopsloops=[(i+1,'loop')foriinrange(controller.loops)]#Determine the correct number of cascade loopsloops+=[(i+1,'cascade')foriinrange(controller.cascades)]# Print the currect status of all of the loops, both cascade and "standard"forloopinloops:print'\n'printloopprintjson.dumps(controller.get_loop(*loop),sort_keys=True,indent=4)
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.