Interrupt mask on Neuron group - Digital Input state event
-
Hi,
i don't understand the use of register Interrupt mask on each group.
Can I use it to read the Digital input state as interrup ?Now I check the Digital Input state changed with polling on register, is there another way?
thanks.
-
Hello @sabrus,
these are statuses of each group informing that something has happen and is designed to save some communications. So theoretically you can read only the mask and if it the 'Digital input changed state' is set to True, then you read the state of all DI instead of reading them all the time.
But of course, polling the register/coils all the time also works well.
1 issue: If there is a serial line in the group (group nr 1), I do not recommend using the interrupt mask because reading serial communications resets the mask.
-
Hi,
thanks.
So, there isn't way to get the digitail input state change different that polling (es hardware interrup) ? -
Unfortunatelly currently not 100% reliable.
-
Hi...i am a new user here. As per my knowledge these are statuses of each group informing that something has happen and is designed to save some communications. So theoretically you can read only the mask and if it the 'Digital input changed state' is set to True, then you read the state of all DI instead of reading them all the time.
-
@LulaNord correct! :)
-
hi @tomas_hora
We have created an automation machine and we writred custom code that use mdobus server.
I realize that the neuron is not ideal for fast automation becouse the response time of DO and DI is not costant and specially checking input events is very hard throught polling (we add different modbus connections for any input)
I think the neuron is ideal for static controlling but not for automation (Photocells, sensors) and real time application.
Do you think right my opinion?Regards.
-
@sabrus what is the expected response time of the DO or DI in your application?
-
Hi @tomas_hora , we work in continuos automation so the response time must be in at max 50 mills.
-
@sabrus Right now one loop in Mervis is about 30-60ms (can be seen while in debug mode in System status tab) but it also depends on the complexity of the application. You can also try to set a lower sleep ration in the task, eg. 5% in stead of 50% to make it little faster. There are some plans to make the whole runtime run much faster but I cannot promise anything...