Communicating error in ethernet to print variable.

1 view (last 30 days)
Hi!
Thesedays, I am interfacing yokogawa GS200 instrument. and I have a problem communicating with it via ethernet port.
When I communicate with GS200 via GPIB port, simply to give voltage level to the yokogawa GS200, I set gpib connection to the matlab.(I'll not show here the basic gpib setting)
and then I type below
fprintf(obj1, ':SENS:LEV 100E-3')
Then I can see the voltage is set to 100 mV in my yokogawa GS200 instrument.
To set the voltage level with variable I set
V=50E-3 %put voltage level whatever I want to set, in here just to 50 mV as example
fprintf(obj1, ':SENS:LEV %d',V)
Then, it also works and I can see the voltage is set to 50 mV in my yokogawa GS200 instrument.
So, I want to do same procedure using ethernet port.
I set ethernet port setting properly.
I type
fprintf(obj1, ':SENS:LEV 100E-3')
and It works and I can see the voltage is set to 100 mV in my yokogawa GS200 instrument using ethernet port.
But, when I try to input variable voltage as same way as I did with gpib port
V=50E-3 %put voltage level whatever I want to set, in here just to 50 mV as example
fprintf(obj1, ':SENS:LEV %d',V)
it doesn't work. yokogawa GS200 shows error. The yokogawa GS200 doesn't interpret the command properly when I communicate through ethernet.
How should I set command propely to make it happen?

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!