void dacOut2 (u8 dacId, u8 dacCh, u16 daValue)
dacId : The ID of the DA Output Module (0 ~ 9) |
dacCh: The channel on the DA Output Module (1 ~ 2) |
daValue: The output magnitude (0 ~ 60,000) |
Sets the output of the digital-to-analog converter (DAC) on DA Current Output Module dacId, channel dacCh. daValue is the magnitude of the output current represented as a number between 0 and 60,000.
Up to 10 DA Current Output Modules can be installed in a single system providing a total of 20 DA output channels.
daValue corresponds linearly to the output current (4 ~ 20mA, dipswitch OFF / 0 ~ 20mA, dipswitch ON).
#include "moacon500.h" void cmain(void) { while(1) //Run forever { u16 v = 0; for(v = 0; v<60000; v+=6000) //Increase { dacOut2(0,2,v); //Set output current delay(1000); //Wait for 1 second } } }