Command Syntax
SOURce:FILe:LENgth
Note
This command not allowed during scenario execution, and will result in the error code “-
190,"Execution in progress"”.
The checksum is calculated using the following algorithm, presented here in a Python language
example. The array s passed in must be read from a file opened with attributes read and bin
ary (rb).
def cksum(s):
sum = 0
for c in s:
sum += ord(c)
sum &= 255
sum = -sum
return sum
An example in C is shown below. Again, the char *Data array is read from a file and is a bin
ary array of unsigned 8-bit char values.
unsigned char CalcChecksum(const char *Data, unsigned Length)
{
unsigned char sum = 0;
unsigned char chksum;
unsigned i;
for (i = 0; i < Length; ++i) {
sum += Data[i];
}
chksum = -sum;
return chksum;
}
6.3.3.100 SOURce:FILe:DATA
Function
This command sends the file data to the unit. The file being transferred is divided into multiple
data commands. There can be as many data commands as needed to send the whole file. The
maximum data in one command is 4000 bytes. At the start of each data block there is a header
#800001234 which tells that 8 following digits gives the length of block.
Command Syntax
SOURce:FILe:DATA
300
CHAPTER
6
•
User Manual GSG-5/6 Series
Rev.
26
6.3 Command Reference
Summary of Contents for GSG-5 series
Page 2: ......
Page 4: ...Blank page II User Manual GSG 5 6 Series...
Page 116: ...BLANK PAGE 3 6 Options Menu 100 CHAPTER 3 User Manual GSG 5 6 Series Rev 26...
Page 182: ...BLANK PAGE 4 9 Studioview Tasks 166 CHAPTER 4 User Manual GSG 5 6 Series Rev 26...
Page 368: ...BLANK PAGE 6 7 Revision History SCPI Guide 352 CHAPTER 6 User Manual GSG 5 6 Series Rev 26...