Modbusmaster
-
Hey guys,
i'm trying to understand the example of Qt Modbus Master. Everything was comprehensible until the point QTreeview. In design mode the checkboxes are not shown but when I run the Code, the system will probably generate the chexboxes itself. Is it true? if yes i would like to know where in the code are the inputs of these checkboxes stored because I would like to use the inputs of these checkboxes later. -
@Zac-Boussaid Its done in the model, see writeregistermodel.cpp
-
First of all thank you for your answer.I saw the Data "writeregistermodel.cpp" but i wasn't able to understand in which variable are the Inputs of the Checkboxes stored.
-
@Zac-Boussaid The data is stored in m_coils member variable.
-
I’m using the Modbusclient example. The writeregistermodel.cpp uses a function that i cannot call in the Window.cpp.
For example i want to use the two variables index and s in the Function setData which exists in writeregistermodel.cpp and i want to check their state in the mainwindow.
the main idea is: let's suppose i have a lamp that i want to turn it on using a switcher. i will send a request to check the state of the switch. IF the switcher is on i would like to automatically turn my lamp on. In this case i would like to be able to automatically send a write request. Could some one give an idea how can i achieve this task.
Thank you in Advance
-
@Zac-Boussaid said in Modbusmaster:
Could some give an idea how can i achieve this task.
-
thank you for your help
the problem is solved