Code covered by the BSD License  

Highlights from
Powersupply EA PSI 900 VCP _USB Control Exsample

Powersupply EA PSI 900 VCP _USB Control Exsample

by

 

Control EA PSI 9000 Powersupply with Instrument Toolbox

G=Remote(G)
function G=Remote(G)
%% Remote

% Objekt
OBJ_bin=uint8(54); % Remote

% Maske Datenbyte1
Maske_bin =uint8(hex2dec('10'));

% Steuerbyte Datenbyte2
Steuerbyte_bin =uint8(hex2dec('10')); %hex, Remote Ein

% checksum
CS_bin = swapbytes( uint16(G.SD_bin) +uint16(G.DN_bin) +uint16(OBJ_bin)...
         +uint16(Maske_bin) +uint16(Steuerbyte_bin) );

% Tellegramm Remote
G.T_Remote =uint8([...
            G.SD_bin G.DN_bin OBJ_bin Maske_bin Steuerbyte_bin ...
            typecast(CS_bin, 'uint8') ]);
fwrite(G.s,G.T_Remote);

Contact us