Author Topic: DAC  (Read 12499 times)

philipjoseph

  • Jr. Member
  • Posts: 57
    • View Profile
DAC
« on: February 11, 2003, 10:54:49 AM »
Hi,
I want to control the speed of a motor using a AC inverter. The inverter has a 0-5V speed control, so I want to use the DAC output from a T100MD888. With the HMI the operator could change the speed. I'm saving the speed value (0 to 500) in a variable (D). I need that the 0-500 will be proportional to 0-5 VDC. How can I program the DAC?
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Philip.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: DAC
« Reply #1 on: February 11, 2003, 11:16:44 AM »
Do a scaling on the variable D and send it to DAC output:

V = D*4096/500
SETDAC 1, V

Hence, if
  D = 0 ==> V = 0
  D = 250 ==> V = 2048
  D = 500 ==> V = 4096   ' full scale.

« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

v singh

  • Guest
Re: DAC
« Reply #2 on: February 17, 2003, 06:04:27 PM »
Hello:

I am having problems with DAC1 on a 1616+. At setDAC 1,0 I get about 6.4 mA. At setDAC 1,4095 I get 20 mA. Why don't I get 0 ? I used a 250 ohm resistor because I need 0-5 V but it does not work. I used DAC2 which gives 0-5 V fine but it is a pain to solder a wire to the pad. Why ??? is there no connector on DAC2 ?

Otherwise we like it for an OEM application. - VS.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

Ken

  • Newbie
  • Posts: 16
    • View Profile
Re: DAC
« Reply #3 on: February 18, 2003, 01:53:35 PM »
Did you try trimming the circuit with the pot located upper left of the processor?
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

vsingh

  • Guest
Re: DAC
« Reply #4 on: February 18, 2003, 03:54:49 PM »
Yes. I tried it on two 1616+ boards with the same results. I must be missing something.

- VS
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: DAC
« Reply #5 on: February 19, 2003, 05:28:19 AM »
How did you measure your current reading? Can you connect a mA meter to the DAC1 output (red probe) and 0V (black probe) without using the resistor? You should be able to get near zero current when setDAC 1,0.

Once this is successful, then connect the 250 Ohm resistor across the DAC1 output and 0V. Then measure the output using a voltage meter without connecting this to your load. (I am worried that your load may be introducing voltage to the DAC output which make it appear to be sourcing 6.4mA
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS