I created a GUIDE GUI for my class project. I created two push buttons and now, what I need to do is initialize the serial port with one push button and send in the following commands with the second push button. How do I do that? No clue how guide works. Any help is appreciated.
Initialize push button: Initialize COM1 port s and open COM1 s
Read DTC push button: send fprintf(s,'%s\r','03') and fprintf(s,'%s','13');
How do I do this in the m-file editor? Whats the format?

Réponses (1)

Sean de Wolski
Sean de Wolski le 2 Août 2011

0 votes

You put the commands in the callback buttons to the buttons which should've been automatically generated by guide and in the *.m file corresponding to your figure.

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by