GUIDE Serial help
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello guys. I am trying to define a serial object at the opening function. and I am a super beginner. I just want to know how to pass my objet to the other objects. It doesn't work when i try it. here is my current code:
serialptr = serial('COM9'); fopen(serialptr); serialptr.DataTerminalReady = 'on'; serialptr.RequestToSend = 'off'; fclose(serialptr);
I had to put this in every single button callback. Can anyone tell me how to do them in one callback and then send it to the rest. DTR, RTS will be changed in every function. Also I want to open port in one function and close it in another one. I tried nesting but didn't know how to nest all these callbacks into another one without damaging their properties. I really need an global object which will be used in every function and then saved in that function. does matlab have anything like C++ in hich u pass the refrence (pointer) and each function then could save everything onto the main object. Also in this matter security does not matter to me at all.
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!