How I can communicate via serial port with external equipment monitoring and control with string or int data type?
It may be the case that win32 api already has ways to write to the serial port, eg here , or already has a dll, in which case OP would need to know how to import the win32 functions from mql.
The Win32 API were my first idea with "Importing Function (#import)", but MQL4 not recognize "HANDLE hComm;"and I locked
I have basic grasp of what it is I think you are trying to do here, although I am not 100% sure of that. But I am 100% sure I do not know how to implement it. I will post what I see you are trying to do here ruben, for other people who might not be understanding what it is you are saying based on your original post.
The issue is that there are 2 devices linked by a serial connection of some sort (basically instead of ethernet, they would potentially be hardwired together through the serial port of the PC). The uC (not sure what this part is) is constantly watching the serial comms for events (kind of like an event in C++ style programming). Notification would be made and certain procedures would be started when certain related events happen, like alarms and/or failures of certain things. Counters could also be one of the things modified by the messages sent through the serial port information, although for this I would think this part would have to be set up external to the system. The system could send the information that X happened, and then it would be the responsibility of the external stuff to actually count and keep track of it.
Hopefully this is a little more detailed (and accurate) explanation of what you want to do ruben, and even more hopefully, it helps someone else understand who has an idea on how to make this happen for you.
- The Script ( or EA ) communicates with a program (via pipeline) and
this program communicates via the serial port to the microcontroller .
The advantage of this system is that the program could control multiple