04-10-2007 09:58 AM
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
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??
04-11-2007 12:57 PM
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
04-11-2007 01:09 PM