User manual
5Page
Velleman Projects
Overview of the Functions
General functions
int OpenDevices() Opens the communication link to the VM167
devices
void CloseDevices() Closes the link to the VM167 devices
int Connected() Checks that the USB connection to the cards is
valid
int VersionFirmware(int CardAddress) Reads the firmware version
number
int VersionDLL() Reads the DLL version number
void InOutMode(int CardAddress, int HighNibble, int LowNibble)
Set the digital terminals either inputs or outputs
Analog to Digital converter functions
int ReadAnalogChannel(int CardAddress, int Channel)
Reads the status of one analog input-channel
void ReadAllAnalog(int CardAddress, int *Buffer)
Reads the status of all analog input-channels
PWM Output functions
void SetPWM(int CardAddress, int Channel, int Data, int Freq)
Sets the status of one PWM output
void OutputAllPWM(int CardAddress, int Data1, int Data2)
Sets both of the PWM outputs
Digital Output functions
void OutputAllDigital(int CardAddress, int Data)
Sets the digital outputs according to the data
void ClearDigitalChannel(int CardAddress, int Channel)
Clears the output channel
void ClearAllDigital(int CardAddress)
Clears all output channels
void SetDigitalChannel(int CardAddress, int Channel)
Sets the output channel
void SetAllDigital(int CardAddress)
Sets all output channels
Digital Input functions
bool ReadDigitalChannel(int CardAddress, int Channel)
Reads the status of the input channel
int ReadAllDigital(int CardAddress)
Reads the status of all the input channels
Counter functions
void ResetCounter(int CardAddress) Resets the 32 bit pulse counter
unsigned int ReadCounter(int CardAddress)
Reads the content of the 32 bit pulse counter
Readback procedures and functions
void ReadBackPWMOut(int CardAddress, int *Buffer)
Reads back the status of the PWM outputs
int ReadBackInOutMode(int CardAddress)
Reads back the current in/out mode of the digital
terminals