Hi，Schelleg and Cathalmccabe,
Thank you! I have found the problem. My setup sequence has problem. After run the code: dac = Pmod_DAC(ol.PMODB), I connect the Pmod_DA4 hardware module. after that, run the code: dac.write(2). It has no response. The correct way is connect the pmod_da4 hardware at first, then run all the code. The reason is the code: dac = Pmod_DAC(ol.PMODB) will initial the DAC chip and define reference voltage.
But I have another problem, if I want to use all 8 channels DAC output, If I need modify the library as below link said: Digilent PmodDA4