Created
June 8, 2012 12:51
-
-
Save cehars/2895442 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Windows.Forms; | |
| using NationalInstruments; | |
| using NationalInstruments.DAQmx; | |
| namespace WindowsFormsApplication4 | |
| { | |
| public partial class Form1 : Form | |
| { | |
| public Form1() | |
| { | |
| InitializeComponent(); | |
| } | |
| private void textBox1_TextChanged(object sender, EventArgs e) | |
| { | |
| } | |
| private void btnWriteAnalogOut_Click(object sender, EventArgs e) | |
| { | |
| Task analogOutTask = new Task(); | |
| AOChannel myAOChannel; | |
| myAOChannel = analogOutTask.AOChannels.CreateVoltageChannel("dev1/ao0", "myAOChannel", 0, 5, AOVoltageUnits.Volts); | |
| AnalogSingleChannelWriter writer = new AnalogSingleChannelWriter(analogOutTask.Stream); | |
| double analogDataOut; | |
| analogDataOut = Convert.ToDouble(txtAnalogOut.Text); | |
| writer.WriteSingleSample(true, analogDataOut); | |
| // kullanacağımız zaman | |
| Form1 nesne1 = new Form1(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment