I have a Wago 750-652 (RS232-485 module) connected in RS-485 to a vacuum pump using a custom protocol.
The communication between the PLC and the pump is working, and I can send and receive messages from the pump with the i/o check tool of Wago.
I want to make a program which is able to control the pump and retrieve some information of the pump such as temperature, speed, ... Nevertheless, I'm not sure about the implementation of this kind of program. Indeed, I have to send a lot of messages (3 messages for requesting a value for example), but the I/O values of the RS-485 module are only updated at the end of a Codesys task.
What is the best way to send multiple messages (update the i/o values of RS-485 module) during a task ? Create a second task which is dedicated to the RS-485 communication ? Must this task be running in a cyclic way, or with an event ?
Thanks in advance.
Arnaud
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Greetings.
I have a Wago 750-652 (RS232-485 module) connected in RS-485 to a vacuum pump using a custom protocol.
The communication between the PLC and the pump is working, and I can send and receive messages from the pump with the i/o check tool of Wago.
I want to make a program which is able to control the pump and retrieve some information of the pump such as temperature, speed, ... Nevertheless, I'm not sure about the implementation of this kind of program. Indeed, I have to send a lot of messages (3 messages for requesting a value for example), but the I/O values of the RS-485 module are only updated at the end of a Codesys task.
What is the best way to send multiple messages (update the i/o values of RS-485 module) during a task ? Create a second task which is dedicated to the RS-485 communication ? Must this task be running in a cyclic way, or with an event ?
Thanks in advance.
Arnaud