Azzera filtri
Azzera filtri

GUIDE Serial help

1 visualizzazione (ultimi 30 giorni)
arman Yaraee
arman Yaraee il 1 Mar 2012
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.

Risposte (1)

Walter Roberson
Walter Roberson il 1 Mar 2012

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by