14
PRS-200 Series
PROGRAMMING
Read the IDN string from the PRS
Parse the IDN string to extract the IDN String Model
(second) section. Parse this further to determine:
let iType= type of device (R,L,C,RTD; enum 0-3)
let iModel = model (200,201,202; enum 0-2)
let iTol = tolerance (see section 7.3.1; enum 0-10)
let iDec = value of “Number of Decades”
let nMin = numeric value of LSD (see section 7.3.1)
let locLSD = location of the LSD on system board
let iOption = options installed (see section 7.3.1)
let iMax =(iMin*10**nDec)
Calculate iMax. In our example, the LSD is 100m or
0.1 Ohms and the number of decades is 6
iMax =(0.1*10**6)-iMin ; or iMax = 99,999.9
7.3.3 Source Impedance
Range test the desired output value against iMin and
iMax. Coerce the supplied value to the max or min,
return an error code, or use optionally equipped OC/
SC features per your needs.
Example 1:
let iModel = 0 (model 200/201 system board)
let iValue equal 123.51
iValue is < 99,999.9 and > 0.1;
therefore iValue = 123.51
Example 2:
let iModel = 1 (model 202 system board)
let iValue equal 1,000,000
iValue is > 99,999.9;
if iOption = 1 or 3 then iValue = 100,000.0
else iValue = 99,999.9
Multiply iValue by one over iMin to shift the digits
below the operating range of the PRS to the right of
the decimal point (in this case, 10). Select the integer
portion of iValue
Example 1:
iValue=iValue*(1/iMin)
iValue=123.51*(1/.1); or iValue = 1235.1
iValint=int(iValue); or iValint = 1235
Example 2:
iValue=iValue*(1/iMin)
iValue=100,000*(1/.1); or iValue= 1,000,000.0
iValint = int(iValue); or iValint = 1000000
Shift this value to align it with the location of the first
decade in the PRS. locLSD from our IDN string evalu-
ation is 1, so:
Example 1:
iValint = iValint * (1*10^(locLSD))
iValint = 1235 * (1*10^(0))
iValint = 1235 * 1; or iValue = 1235
Example 2:
iValint = iValint * (1*10^(locLSD))
iValint = 1000000 * (1*10^(0))
iValint = 1000000 * 1; or iValue = 1000000
Convert the number to a string value using a “for-
mat” function that includes leading zeros. A 200/201
series unit has 10 decade locations, a 202 has 12.
prsCmd = “SOURce:DATA ” _
& format(iValue,“0000000000”)
Example 1:
“SOURce:DATA 0000001235”
Example 2:
“SOURce:DATA 000001000000”
Send the prsCmd string to the PRS.