Jump to content
  • 0

Set '3' into Boolean field


Richard Gold

Question

Hello,

I'm confused about some of the function descriptions in the WaveForms SDK Reference Manual.

I want to set the analog output to dynamically, from the documentation for the function FDwfDeviceAutoConfigureSet it says to set fAutoConfigure to 3.
However fAutoConfigure is defined as a Boolean value.
There is a similar case for FDwfAnalogOutConfigure

Is the documentation incorrect? Or am I misunderstanding how to set this value?

Thanks in advance,
Richard

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hi @Richard Gold

The type of these parameters is BOOL, typedef int BOOL; 
I don't wanted to introduce a new function to extend the features but solved by using it as integer. Sorry for the confusion.

The WaveForms application disables the auto-configuration and it is recommended for larger applications to do this way, to minimized communication with the device.
dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) 
Having this set, only the dwf.FDwf*Configure and *Status functions will interact with the device.
The dwf.FDwfAnalogOutConfigure(hdwf, channel, c_int(3)) will apply the previously set options without changing the run/stop state. With 0 it will stop and with 1 it will start the channel.

You can also use dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(3)) then FDwfAnalogOut*Set functions will be applied dynamically.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...