VISA serial port communication with ardino is done in string format. So, 255 is read in ardino serial.read() as a string which cannot be written to analog port. This will not show any errors while compiling but will not get the desired result which we expect.