From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-20-2022 07:16 AM
I guess you're missing a : after RANG.
05-20-2022 07:52 AM - edited 05-20-2022 08:04 AM
if it is missing, i think it should be before rather than after.
According to the programming manual it should be:
:SOUR1:VOLT:RANG:AUTO ON;AUTO:LLIM 2.000000;:SOUR1:VOLT:RANG 2.000000;:SOUR1:VOLT 0.000000;VOLT:TRIG 0.000000;:SOUR1:FUNC DC;FUNC:MODE VOLT;TRIG:CONT ON;
05-20-2022 08:10 AM - edited 05-20-2022 08:44 AM
@billko wrote:
I guess you're missing a : after RANG.
Bad guess.
SCPI commands start a root or ":" then traverse command trees with colons and semi colons.
Eg :System:sub1:sub2:param1 val;param2 val is the same as :System:sub1:sub2:param1 val
:System:sub1:sub2:param2 val
Because the semicolon backs up 1 tree level
So the silly
:SOUR1:VOLT:RANG:AUTO ON;AUTO:LLIM 2.000000;RANG 2.00000
Is really 3 commands
:SOUR1:VOLT:RANG:AUTO ON
:SOUR1:VOLT:RANG:AUTO:LLIM 2.000000
:SOUR1:VOLT:RANG:AUTO:RANG 2.000000
Looking at the second and third we can see somebody done something wrong. I'd guess the individual commands were shortened with semicolons and then reordered after a code review. Oops.
The command parser can probably forgive the second command since AUTO and llim are at the same level. But, range:auto:range is going to require penance.
Unfold the semicolons and use the output of mode ( either :SOUR1:Volts or SOUR1:Current) as the staring string for the other parameters. And you should select either RANG:AUTO ON or RANG:AUTO OFF; %g .
Then provide the feedback to the IDN site
05-22-2022 11:38 PM
Hi, thank you so much for suggestion.
Now the issue has been solved by adopting your suggestion.
Very crucial point is, we need to predefine the channel and Current/Voltage when using RANG, which was omitted in the original IV provided.
:SOUR1:VOLT:RANG:AUTO ON;AUTO:LLIM 2.000000;:SOUR1:VOLT 0.000000;VOLT:TRIG 0.000000;:SOUR1:FUNC DC;FUNC:MODE VOLT;TRIG:CONT ON;
Thanks again for all your help !!