Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Writing to a DAC output

In my application I need to use the spare DACs that aren't being used for motors for general purpose analogue outputs. I'm currently working with a DeltaTau simulator rack and am trying to use the second DAC associated with channel 0 (it's a Gate3 Acc24 card).

I've generated the following variables:
ptr DAC1->$900040.0.32; //1st DAC
ptr DAC1c->$900044.0.32; //2nd DAC

When I close the loop on motor 1, I can see suitable values in DAC1 and measure the voltage on the connector pins.

If I write a value to DAC1c from the terminal window, I can see this reported correctly in a watch window - but I can't see any voltage on the connector pin (I think that I have the right one). Am I doing the wrong thing here - or might I have missed something that needs setting up before this will work?

Hi Steve,

If you have ServoCtrl=1, PMAC is controlling the DAC values and you cannot overwrite them.

If you have ServoCtrl=0 and are trying to manually write to the DACs, you have to enable the output (e.g. Gate3[0].Chan[0].AmpEna=1).

You can also use the System Setup utility's Hardware Diagnostic page for your card and manually adjust the DAC output sliders (see page 21 of the Power PMAC IDE manual).
Hi Charles

I think that the problem is - there's no DAC fitted! I'm so used to UMAC systems that I didn't realise that you ship Gate3 boards with only 1 DAC per channel.

Can you confirm that if my motor is only using DacA, then I can control DacB (if it's fitted) from a PLC by writing to$900044.0.32, in the same manner that I've done for years with UMAC with a Gate2 board?
I believe that if your motor is enabled (Motor[x].ServoCtrl = 1), both DACs will be overwritten by the servo loop. To manipulate these, you need to do what I mentioned before (disable ServoCtrl and manually enable the output).

I could be mistaken, however, so you might want to email into support at deltatau dot com to make sure.
If you are not commutating the motor (Motor[x].PhaseCtrl bits 0 and 2 = 0), the motor will only write to the single register specified by Motor[x].pDac.

If you are commutating but not closing the current loop (Motor[x].pAdc = 0), the motor will write to the register specified by Motor[x].pDac and the next register (e.g. both the A and B phase DACs).

If you are commutating and closing the current loop, the motor will write to the register specified by Motor[x].pDac and the next 2 registers (e.g. the A, B, and C phase DAC/PWM registers).

Any output register not automatically written to by the motor is available for general purpose use (provided, of course, that you have the output hardware to make it useful).

Power PMAC works the same as the older PMAC and Turbo PMAC in this respect.
Hi Curt

Thanks for clarifying this - I was beginning to think that we had a big problem - but if we are still able to do what we've done in the past - that's great!


Forum Jump:

Users browsing this thread: 1 Guest(s)