Register | Login

Quick search in Advantech Support Portal 
Print

[Technical Inquiry] Adding Writing function to example program.

This topic has been type by ben.morgan at 2010-3-5 23:25.

Adding Writing function to example program.

Hello everyone. I had come across ADAM modules. Then I came across ADAM.Net. And so far this utility had save me a lot of financial. But the sample program does not have witing or saving to o text file function. And so far I used video recording to record the data acquired. And I'm a beginner to VB.Net programming. I would like to ask helps on adding saving function to the program. Would someone please demonstrate the code lines for one channel. The sample program that i would like to alter is sample program "Adam4017P_18P_19_19P" for WIN32 for VB. But if someone would be kind enough to alter the whole program for me, I would be very grateful.
Share |

TOP

Hi,
It's pretty simple to write values to a text file.  Here is a site that describes the streamwriter function:
http://dotnetperls.com/streamwriter-vbnet
Share |

TOP

I know its simple, but I don't know which output to use to save the data, and how to capture it.

txtAIValue0.Text = "0x" + iVals(0).ToString("X04")

is it this one?, or

RefreshValue(txtAIValue0, status(0), fVals(0), m_byRange(0))

I need just an example on one channel. How to forward that output from every 500ms to StreamWriter.
Share |

TOP

Adam4017P_18P_19_19P.zip
Attachment: Your usergroup does not have permission to access attachments
Share |

TOP

I didn't expect that. Now i'll try to add a button so as that i can choose to save data after i click a button. Thank you very much for your time in helping me. I really appreciate it.
Share |

TOP

I had managed to modify it the way I would like it to be, so thank you ben.morgan and other people for helping me solve my problem.

This thread can be locked.
Share |

TOP