Hello There,
First call DCFGPORT.VI once only for each of FIRSTPORTA and FIRSTPORTB, to set the direction of each of these two 8-bit ports. Then you must decide whether to control/read via byte operations (i.e. an entire 8-bit port) or via bit operations (one of the 16 individual lines at a time)
For Byte operations, use DIn.VI or DOut.VI, making sure to specify FISRTPORTA or FIRSTPORTB.
For Bit operations, use DBitIn or DBitOut. Be sure to always specify FIRSTPORTA (do not specify FIRSTPORTB). The bit number is between 0-7 for port A and 8-15 for port B.