send number to PIC through matlab gui

Namaste,
I am communicating PIC controller with matlab GUI. Communication is ok ,data sent is comming back.
I want to send the setpoint(number) to pic.
1... I enter set point( lets say 1) in edit text, then extract number using "str2num" cmd. then i sent through "fwrite" cmd. But pic receives as ascii code corrosponding to '1'. But when i direcly send number using fwrite( in gui background), it recives exact number.
So my question is how to send number on serial port through matlab gui.
2... i can communicate on extra port( usb to serial convertor virtual port)using matlab , but i cant see same port in SIMULINK.

Respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Preguntada:

el 28 de Oct. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by