LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pic 16f877 rs 232

Solved!
Go to solution
i think i have dowloaded this programme from here!
0 Kudos
Message 11 of 39
(2,184 Views)

I can understand why you are confused.

 

Whoever wrote that didn't know what they were doing.  The local variables and stacked sequence structurs are painful to look at!  Several items in there such as comparing a boolean control to a boolean constant are straight out of the Rube Goldberg thread.  I like how the one stacked sequence structure (in frame1 of the big stacked sequence) uses 6 frames to send 1 byte at a time to the serial port.

0 Kudos
Message 12 of 39
(2,181 Views)

I agree. That is a very bad example. How did you actually find it? Don't even bother with it - just delete it.

 

Try the attached VI and see how far you get.

Message 13 of 39
(2,174 Views)

wowwww !!!!

thanks smercurio_fc !

i have just trie it and it realy works beautifuly !

i´m going to analise how it works !

you are right it seems mutch more simple !!!

thanks again.

0 Kudos
Message 14 of 39
(2,150 Views)

hello !

the programme is runing very well !

a can separate in a string , 8byts, whith 8bits !   (some experiences)           y     x

From the pic i´m sending 4 byts , 2 for eatch  ADC! a read something like (03 ;255) = 5V!

I have tried meny solutions but don´t seame very estable!tried numeric operations ......x+(256*Y)

how can i ad this two numbers to be with 1024 ?? am i going on a wrong way????

0 Kudos
Message 15 of 39
(2,126 Views)
I'm sorry, but I did not understand a single thing you said. Can you please rephrase, or provide a concrete example?
0 Kudos
Message 16 of 39
(2,123 Views)

Sorry !

well what  i was triing to say ,was that a´m sending data from ADC .The ADC has a 10bit resolution!in serial comunication ,i can only send 8bits string.

if i want to read 10bit from ADC , i must send 2 byts ( 2x8bits) right ???

when ADC is reading ex: 5V he must have 1024 positions(10bits)!In Labview , i can read 2 byts the first(03), and the second (255).

I have tried to add this 2 byts in order to have  1024 ( 10 bits). Ex:

 

                                                           first byte (x)       second byte(Y)

                                                            (03)                    (256)                      X+(256xY)=result(1024)

 

this aplication works,but it doesn´t seme very stable!!!!

my question is :how do i add this 2 byts, or there is a more simple way!

 

am i taking a wrong direction???

I´m realy sory about my ingles!!

 

                                                           

 

0 Kudos
Message 17 of 39
(2,116 Views)

Yes.  You can use the join bytes function.  You wire in two U8 bytes and out comes a single U16 byte.

By the way, a byte can only go up to 255.  And if your first byte is the high byte of 03, then it is (X*256)+ Y = 3*256 + 255 =1023
Message Edited by Ravens Fan on 07-09-2009 03:49 PM
0 Kudos
Message 18 of 39
(2,113 Views)

A Type Cast would give you the same thing. Smiley Wink

Example_VI.png

Message 19 of 39
(2,104 Views)

smercurio_fc wrote:

A Type Cast would give you the same thing. Smiley Wink

 


Dohhh! Of course.

 

What got me on the path of the join bytes was that other thread where the poster was trying to decipher the byte but said that the byte of interest was slipping between the first and second byte.

0 Kudos
Message 20 of 39
(2,094 Views)