Controlling Recom rcd-48?

I am trying to dim an LED with a Recom RCD-48 driver using an arduino. Based on the data sheet (http://www.mouser.com/ds/2/468/RCD-48-225945.pdf) I have hooked up pin 1 to vin from the power source and pin 2 to the ground, pin 7 to vout+, pin 6 to vout-, pin 4 to an arduino pwm pin and connected the ground to the arduino ground. When the power supply is plugged in and the arduino is not connected the light comes on at full blast but when I connect the arduino pwm pin the light flickers extremely fast with full light no matter what value I set the pin to. Can anyone tell me what I am doing wrong?

I forgot to post the code I am using. It is simple and works with different led's and a different driver but not the Recom RCD-48.

int ledPin = 9;      // LED connected to digital pin 9

void setup()

{

  pinMode(ledPin, OUTPUT);   // sets the pin as output

}



void loop()

{
  analogWrite(ledPin, 0);  // analogRead values go from 0 to 1023, analogWrite values from 0 to 255

}