I am trying to read and display analog input data from my USB 1408FS in a C# application but ran into a problem. I can display one channel at the time after some sorting through the sample codes but I am stuck at how I can read 2 channels for example and simply display this data in a simple C# form.
Trying to build a simple application that reads several pressure sensors and I want to show them all on the screen, very simple to start before making it more complex. Pressure monitor will run 24/7, burst measuring is not the way to go, it just needs to stream the values to the screen.
Sample code has this line to read the input voltage on a channel:
ULStat = DaqBoard.VIn(Convert.ToInt16(nudAInChannel.Value), Range, out VInVolts, MccDaq.VInOptions.Default);
This all works fine but changing the channel reads the voltage to the same VIVolts variable that cannot be changed it seems. VInVolts0 for channel zero and VInVolts1 for channel 1 would be the solution but this does not work.
Can anybody shine some light on how to do this for me?
Question
JBOS
Hello everyone,
I am trying to read and display analog input data from my USB 1408FS in a C# application but ran into a problem. I can display one channel at the time after some sorting through the sample codes but I am stuck at how I can read 2 channels for example and simply display this data in a simple C# form.
Trying to build a simple application that reads several pressure sensors and I want to show them all on the screen, very simple to start before making it more complex. Pressure monitor will run 24/7, burst measuring is not the way to go, it just needs to stream the values to the screen.
Sample code has this line to read the input voltage on a channel:
ULStat = DaqBoard.VIn(Convert.ToInt16(nudAInChannel.Value), Range, out VInVolts, MccDaq.VInOptions.Default);
This all works fine but changing the channel reads the voltage to the same VIVolts variable that cannot be changed it seems. VInVolts0 for channel zero and VInVolts1 for channel 1 would be the solution but this does not work.
Can anybody shine some light on how to do this for me?
Thanks in advance and best regards,
Jan
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now