Posts: 12

Threads: 3

Joined: Jul 2014

For PMAC 2 the DAC output appears to be X:$0049. According to the manual the DAC value should be a 16 bit value. How can I decode the hex value in that register to get the actual DAC-value? Trying to gather it with Quick plot leads to very small values (like 0.0544...), while the register contains a big value like $FF5210. What I actually expect is a value between -32767 and + 32767.

Posts: 675

Threads: 0

Joined: Jun 2008

The register at X:$0049 is a 24-bit register. The data for a 16-bit DAC is in the high 16 bits of these 24 bits - the first 4 hex digits if you try to read it that way -- $FF52 in your example. If you just want to read it as a signed decimal value, divide the 24-bit value by 256 (2^8) to get the 16-bit value.

In your example, $FF52 converts to 65,362 unsigned decimal. But it is a signed value, so the value you are interested in is 65,362 - 65,536 = -174.

The Quick Plot routine converts this to volts of a +/-10V DAC. In your example, the calculation would be:

V = (-174/32768) * 10 = -0.0531V