LabWindows/CVI

取消
显示结果 
搜索替代 
您的意思是: 

analog input to file ansi c

Hi, i'm trying to use NIDAQmx and AnsiC to develope a basic software, i need to know where i can find some infos for file input output, tipically at the moment i have a very simple problem, how can i acquire from analog input and write samples to a file?
In the C reference help i cann't find anything, in the ansiC examples there's nothing like this for what i've seen.

Regards Flavio
0 项奖励
1 条消息(共 5 条)
3,544 次查看

Hello Flavio

in the AnsiC library there are several functions for file I/O: fopen, fclose, fread, fwrite, fprintf, ... Check the Input/Output class of the AnsiC Library.

Labwindows also has it's own functions for File I/O. Check File I/O in the Formatting and I/O Library.

If you have any specific questions about using these functions, just post again...

0 项奖励
2 条消息(共 5 条)
3,536 次查看
Thank you, first of all a question, i know this isn't the right place, where can i post questions regarding Ansi C  programming cause i'm not using LabWindows or msVC.

Second question, it's not clear to me how to write acquired datas to a file, i created a task with analog inputs, i do acquire samples, but at this point, how do i acces to those datas?

Does anyone have an example of data acquisition from one analog channel and data logging to a text file or something similar?

Regards and please excuse me if i'm not too clear, i'm not a coder...

Flavio
0 项奖励
3 条消息(共 5 条)
3,533 次查看
Guess its the         DAQmxReadAnalogF64   function....

Fl
0 项奖励
4 条消息(共 5 条)
3,528 次查看

Under the Help menu of CVI select Find Examples.  Look under Fundamentals then File Input and Output for examples on how to handle file io.  Look under Hardware Input and Output then DAQmx for examples on how to acquire and access data in an array.  That should get you started.

There are some great examples that you can run to see how various things behave or can be done.  If you have any more questions please feel free to post them here.

Good Luck

0 项奖励
5 条消息(共 5 条)
3,514 次查看