
26
Using the Breadboard
/* read and print the module’s ID Register */
errStatus = viIn16(m_mod,VI_A16_SPACE,0x00,&id_reg);
if (VI_SUCCESS > errStatus){
printf(“ERROR: viIn16() returned 0x%x\n”,errStatus);
return errStatus;}
printf(“ID register = 0x%4X\n”, id_reg);
/* read and print the module’s Device Type Register */
errStatus = viIn16(m_mod,VI_A16_SPACE,0x02,&dt_reg);
if (VI_SUCCESS > errStatus){
printf(“ERROR: viIn16() returned 0x%x\n”,errStatus);
return errStatus;}
printf(“Device Type register = 0x%4X\n”, dt_reg);
/* read and print the module’s Status Register */
errStatus = viIn16(m_mod,VI_A16_SPACE,0x04,&stat_reg);
if (VI_SUCCESS > errStatus){
printf(“ERROR: viIn16() returned 0x%x\n”,errStatus);
return errStatus;}
printf(“Status register = 0x%hx\n”, stat_reg);
/* read and print the module’s A24 Offset Register */
errStatus = viIn16(m_mod,VI_A16_SPACE,0x06,&a24_offset);
if (VI_SUCCESS > errStatus){
printf(“ERROR: viOpen() returned 0x%x\n”,errStatus);
return errStatus;}
printf(“A24 Offset register value = 0x%hx\n”, a24_offset);
/* Write a value of AA to I/O Register, Addr 0x14 */
errStatus = viOut16(m_mod,VI_A24_SPACE,0x14,0xAA);
if (VI_SUCCESS > errStatus){
printf(“ERROR: viOut16() returned 0x%x\n”,errStatus);
return errStatus;}
/* Write a value of FF to WP0 Register, Addr 0x20 */
errStatus = viOut16(m_mod,VI_A24_SPACE,0x20,0xFF);
if (VI_SUCCESS > errStatus){
printf(“ERROR: viOut16() returned 0x%x\n”,errStatus);
return errStatus;}
/* Read the value from I/O Register, Addr 0x14 */
errStatus = viIn16(m_mod,VI_A24_SPACE,0x14,&value);
if (VI_SUCCESS > errStatus){
printf(“ERROR: viOut16() returned 0x%x\n”,errStatus);
return errStatus;}
printf(“0x14 register value = 0x%hx\n”, value);
Содержание E2259A
Страница 3: ... ...
Страница 5: ...2 Contents Appendix A Agilent E2259A Specifications 45 ...
Страница 9: ...6 Notes ...
Страница 10: ...7 Notes ...
Страница 11: ...8 Notes ...
Страница 37: ...34 Register Descriptions or decimal 2 097 408 16 2 097 424 ...
Страница 49: ...46 Agilent E2259A Specifications ...