Skip to content

Latest commit

 

History

History
 
 

c#

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

🪓 C#/.NET Driver

alt text

GitHub last commit

💬 Language and Framework

  • C# 7.3
  • .NETFramework v4.7.2

📚 Required Libraries

📜 VaemDriver Arguments

  • String ip - host IP for tcp/ip (ex. 192.168.0.XXX)
  • int port - TCP port number for tcp/ip (ex. 502)

Example Code

🚀 Start

  • Creates a new Vaem driver object (host IP, tcp/ip port)
  • Initializes and connects to the VAEM
  • Configures the 8 valve channels and saves these device settings

image

♾️ Loop

  • While loop that repeatedly opens and closes all valves
  • Reads the status of the VAEM after opening the valves
  • Waits one second between opening and closing, vice versa

image

🚧 Constructor

  • Creates a new Modbus Client with the given host IP address and port number
  • Attempts to connect to the client three times if needed
  • If connected, initialize the VAEM

image

✔️ Initialization

  • Sets the operating mode of the device to 1 using a write operation
  • Selects the valve connected to channel one with a write operation
  • VAEM is fully initialized and connected

image

🧑‍💻Interface

  • configureValves(int[] openingTimes);
  • (configureVaem() selects all valves instead)
  • openValve();
  • closeValve();
  • readStatus();
  • clearError();
  • saveSettings();

Author

Name Email GitHub
John Alessio [email protected] @jalesssio