Programming with GPIB Commands
2-17 Fast-Frequency-Switching Commands
MG369xC GPIB PM
PN: 10370-10374 Rev. F
2-45
integer_ptr = &num_freqs;
/** Point to the number of frequencies. **/
command_str[7] = (char)(*(integ 3));
/** Get the value of the fourth byte. **/
command_str[8] = (char)(*(integ 2));
/** Get the value of the third byte. **/
command_str[9] = (char)(*(integ 1));
/** Get the value of the second byte. **/
command_str[10] = (char)(*integer_ptr);
/** Get the value of the first byte. **/
double_ptr = &(freq_list[0])
/** Point to the first frequency. **/
command_str[11] = (char)(*(doub 7));
/** Get the value of byte 7. **/
/** Data is LSB first on Intel based PCs. **/
command_str[12] = (char)(*(doub 6));
/** Byte 6. **/
command_str[13] = (char)(*(doub 5));
/** Byte 5. **/
command_str[14] = (char)(*(doub 4));
/** Byte 4. **/
command_str[15] = (char)(*(doub 3));
/** Byte 3. **/
command_str[16] = (char)(*(doub 2));
/** Byte 2. **/
command_str[17] = (char)(*(doub 1));
/** Byte 1. **/
command_str[18] = (char)(*double_ptr );
/** Byte 0. **/
double_ptr = &(freq_list[1])
/** Point to the second frequency. **/
command_str[19] = (char)(*(doub 7));
/** Get the value of byte 7. **/
command_str[20] = (char)(*(doub 6));
/** Byte 6. **/
command_str[21] = (char)(*(doub 5));
/** Byte 5. **/
command_str[22] = (char)(*(doub 4));
/** Byte 4. **/
command_str[23] = (char)(*(doub 3));
/** Byte 3. **/
command_str[24] = (char)(*(doub 2));
/** Byte 2. **/
command_str[25] = (char)(*(doub 1));
/** Byte 1. **/
command_str[26] = (char)(*double_ptr );
/** Byte 0. **/
/** Send the command.
**/
Send(BOARD_ID, source_addr, command_str, 27, DABend);
if (ibsta & ERR)
{
exit (-1);
}
/** Set the pointer back to the start index.
**/
command_str[0] = ‘Z’;
/** ZPN command. **/
command_str[1] = ‘P’;
command_str[2] = ‘N’;
integer_ptr = &start_index;
/** Point to the start index. **/
command_str[3] = (char)(*(integ 3));
/** Get the value of the fourth byte. **/
command_str[4] = (char)(*(integ 2));
/** Get the value of the third byte. **/
command_str[5] = (char)(*(integ 1));
/** Get the value of the second byte. **/
command_str[6] = (char)(*integer_ptr);
/** Get the value of the first byte. **/
/** Send the command.
**/
Send(BOARD_ID, source_addr, command_str, 7, DABend);
if (ibsta & ERR)
{
exit (-1);
}
NOTE:
This program is continued on the next page.
Figure 2-12.
Fast-Frequency-Switching Programming Example (2 of 3)
Содержание MG369 C Series
Страница 2: ......
Страница 6: ...Contents 4 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 262: ...A 34 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 264: ...Index 2 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 265: ......