Controlling Instruments Using the Serial Port
Mostrar comentarios más antiguos
I am beginner of MATALB.. I am kind of confused with sending a command to power supplier. I want to control the power supplier (set the voltage) by MATLAB
s = serial('COM22');
fopen(s);
I think it is connected, I tried to send a command (command can be found here page 39). It is something like
<nrf> A number in any format. e.g. 12, 12·00, 1·2 e1 and 120 e-1 are all accepted as the
number 12. Any number, when received, is converted to the required precision
consistent with the use then rounded to obtain the value of the command.
<n> The number of the output (1 or 2) or associated status register to which the
command relates. On the XEL30-3DP, ‘1’ is the Master (right-hand output) and ‘2’ is
the Slave (left-hand output).
V<n> <nrf> : Set output <n> to <nrf> Volts
V<n>V <nrf> : Set output <n> to <nrf> Volts with verify
So I thought I can just use fprintf, but power supplier does not do anything.
fprintf(s,'*V1V 5')
Anyone can help me a guide or what to look it up? It is quite difficult since I do not have any experience with the MATLAB.
Respuestas (0)
Categorías
Más información sobre Power Supply en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!