Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

WFM_Scale

I have a software made in delphi for the PCI-MIO-16E-1 but now I'm trying to use the PCI-6251, in the my previous software I'm using the function WFM_Scale to convert my float value array to a binary value array, in the new DAQmx is there a function that do this same thing?? Or how can I do this with the new DAQmx??

In my old software this is my routine to write:

WFM_Scale

WFM_Scale

WFM_Group_Control

WFM_DB_Config

WFM_Group_Setup

WFM_Load

WFM_Rate

WFM_ClockRate

WFM_Group_Control

 

And to read I’m using

WFM_Op

 

In my new software I’m using this routine to write:

DAQmxStopTask

DAQmxClearTask

DAQmxCreateTask

DAQmxCreateAOVoltageChan

DAQmxCfgSampClkTiming

DAQmxWriteAnalogF64

DAQmxStartTask

 

But I need to change this to write binary values

 

And to read I’m using:

DAQmxCreateTask

DAQmxCreateAIVoltageChan

DAQmxCfgSampClkTiming

DAQmxSetAITermCfg

DAQmxStartTask

DAQmxReadAnalogF64

DAQmxStopTask

DAQmxClearTask

 

I need to read the same type of data as the old software a Int16 type, and I need to write the same type of date, I know that there’s a function DAQmxReadBinaryI16 but I didn’t found an equivalent for the WMF_Scale, can you help with this problem??

0 Kudos
Message 1 of 3
(3,202 Views)

Elenac,

There is no equivalent function in DAQmx because you can write the floating point data directly to the function using DAQmxWriteAnalogF64, and DAQmx will convert/scale it automatically and write it to the DAC.  Otherwise, you will need to need to use the function DAQmxGetAODevScalingCoeff.  The AO Scaling Coefficients indicate the coefficients of the linear equation that NI-DAQmx uses to scale values from a voltage to the native format of the device.  You would then need to use those coefficients to evaluate the scaling equation.  I would just write the floating point data directly and let DAQmx do the work of converting the data to binary.

Regards,

Erin B.

NI Mexico

0 Kudos
Message 2 of 3
(3,191 Views)
Thank You so much for your help
0 Kudos
Message 3 of 3
(3,188 Views)