If you specify a primary address without a secondary address, secondary addressing is disabled.If you call caddr without an argument, the GPIB-RS232/485/422 returns its current GPIB address.
char buffer  = "caddr 0+22\r";
viWrite(instr, buffer, strlen(buffer), &retCount);
The address can also be changed using NI MAX as shown in the article Changing a GPIB Interface in NI MAX.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.