02-19-2009 08:18 AM
How can i read an adc channel id when i know that i have four bytes. The first byte of each block is the channel id and the next 3 bytes are the measurement value. Do i need the string subset? And how does it work?
thanx labviewviewer
Solved! Go to Solution.
02-19-2009 08:47 AM
Hi labviewviewer,
you can use the string subset function or you work with arrays. To work with arrays, you should first use the string to byte array function.
Mike
02-20-2009 02:27 AM
Hello Mike,
here is a snippet of my programm.
If you can`t see the picture, then copy it into word.
The string includes the information of my port data.
I used the string to byte data, but don´t know how to split (to get the channel id and the decimal number)
I ám only able to use the decimal string to number to change the string. After the transformation i get the voltage. But the channel id is missing.
I need the channel id to write it into a file with the voltages.
Like that:
channel 0 1.23
channel 1 2.34
channel 2 1.26
and so on, for all 8 channels
thanx labviewviwer
02-20-2009 02:35 AM
Hi labviewviewer,
as you said, i can't see the image, but why can't you simply attach it? 😉
Mike
02-20-2009 02:50 AM
Sorry, i´am new here. How can i sent the pics? With insert/ edit image?
02-20-2009 03:01 AM
02-20-2009 03:33 AM
Hi labviewviewer,
what are your raw data? Can you show an example string?
Mike
02-20-2009 04:26 AM
Hello Mike,
Do you remember the Aduc812. I' ve transformed the data from that board from hex into dezimal. So in Labview my raw data from the port consists of a decimal number from 0 to 4095. I can only get the information of the voltage by the formula: voltage = dezimal * 2,5 / 4096.
The problem is the channel. I' am not able to read the channel number. Only the the data from the port in a while-loop.
thanx labviewviewer
02-20-2009 04:50 AM
Hi labviewviewer,
yes i remember and i read again your first post. I thought you have a raw value and the result you expect from it.
See this picture.
Hope it helps.
Mike
02-20-2009 05:02 AM
Hi friends
I am Joseph from London. Anyone tell me the exact meaning of adc.
Joseph