LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adc channel id

Solved!
Go to solution

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

0 Kudos
Message 1 of 15
(3,253 Views)

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

0 Kudos
Message 2 of 15
(3,246 Views)

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

 

0 Kudos
Message 3 of 15
(3,226 Views)

Hi labviewviewer,

as you said, i can't see the image, but why can't you simply attach it? 😉

 

Mike

0 Kudos
Message 4 of 15
(3,223 Views)

Sorry, i´am new here. How can i sent the pics? With insert/ edit image?

 

 

 

0 Kudos
Message 5 of 15
(3,220 Views)
Ok, Mike. Here it is.
Download All
0 Kudos
Message 6 of 15
(3,217 Views)

Hi labviewviewer,

what are your raw data? Can you show an example string?

 

Mike

0 Kudos
Message 7 of 15
(3,205 Views)

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

0 Kudos
Message 8 of 15
(3,200 Views)

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

0 Kudos
Message 9 of 15
(3,197 Views)

Hi friends

 

I am Joseph from London. Anyone tell me the exact meaning of adc.

 

Joseph

 

 

0 Kudos
Message 10 of 15
(3,195 Views)