I need to write a script to control the UART Protocol so that I can simulate a serial conversation. So far, I've got just this code:
varMyString="@T00.";functionSerial_Send(){
print("Automated Serial Writer");for(;;){// Loop at 0.1 sec rate
wait(0.1);Protocol.UART.Send(MyString,false);}}if(!('Protocol' in this)){throw("Please open Protocol instrument");}Serial_Send();
The configuration of my serial is attached
Of course, the endless loop didn't allow me to stop the Script or even abort it. But, it was sending data correctly. To stop the script I had to kill waveforms IDE (v3.7.9).
How can I improve it so that I can stop the program anytime I want? Will I have to set a trigger for that using a StaticIO button?
Question
Joao Paulo
Hi everyone,
I need to write a script to control the UART Protocol so that I can simulate a serial conversation. So far, I've got just this code:
The configuration of my serial is attached
Of course, the endless loop didn't allow me to stop the Script or even abort it. But, it was sending data correctly. To stop the script I had to kill waveforms IDE (v3.7.9).
How can I improve it so that I can stop the program anytime I want? Will I have to set a trigger for that using a StaticIO button?
Thanks,
João Paulo
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.