Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

reciving data from RS232

hi Owen.S

 

i check the GUI provided by you

 

1)  i dont use the external circuitry but i use the cross usb to serial cable i-e one end is usb and other is connected to system com port and i send data from usb hyperterminal to com port hyper terminal and found the loop 100% working  (im using this senario bcz theres some temporary problem in my circiut)

 

2) i send the data to GUI in this format "temp 40 humidity 80 " the  GUI shows the recived data also in the tabs 

 

3) but when i send the complete packet data that is "temp 40 humidity 80 level 10" GUI only shows the temp 40 humidity 80 and level 10 in next line and level data is not shown in tab whats the reason 

 

plz reply

 

i attach the images for better undrstand the problem 

 

loop.JPG

 

 

 

 

 1.JPG

 

 

 

 2.JPG

 

 

0 Kudos
Message 11 of 26
(1,874 Views)

Hi adeelghani,

 

It looks to me as though it might be a coding issue as your serial to usb loop seems fine. 

 

Could you please send me the LabVIEW code you are using so I can get a better understanding of how you are manipulating the incoming data.

 

I hope we can get this sorted out soon 🙂

 

Thanks,

Owen.S
Applications Engineer
National Instruments
Message 12 of 26
(1,869 Views)

Your VI also shows that you are using the run continuous button. Never do that.

 

It's also my VI that you are running and not Owen's. As I have said, this will work as long as you are terminating the string with a LF. It might also need to be changed if the string is longer than 100 bytes.

Message Edited by Dennis Knutson on 09-29-2009 10:28 AM
0 Kudos
Message 13 of 26
(1,855 Views)

oh soryy but thanks to u both sir specially Dennis Knutson

 

ok i noted i thing when i change in string formating form this syntax "temp%f humidity%f level%f " to "l%f h%f l%f" (where t 4 temp h 4 humidity & l 4 level ) the GUI properly works & shows all incomming strings ang display data in tabs.  so whats the reason of this ?????

 

and y the GUI read the strings late (time delay ) where as direct path between transmitter and reciever via cross usb to serial cable.

 

 

thanks 4 replaying

 

untitled.JPG

Message Edited by adeelghani on 09-29-2009 01:07 PM
0 Kudos
Message 14 of 26
(1,839 Views)

Obviously, if you change what is transmitted, you have to change the format string.

 

I asked you in my very first answer to capture the data in the VI, make current values default, save the VI and then post it. If you don't want to do this simple thing, explain why. Otherwise, it's just a waste of time.

0 Kudos
Message 15 of 26
(1,821 Views)

how i make current values deafult ???    perhase i cant get ur point can u briefly explian this ......

 

and my last question how this completet string is not shown "temp 80 humidity 10 level 20"  the string showson tab is only two temp and humidity 

 

and respected sir im not wasting ur point im no my project which should i deliver with gui and bundle of thanks 4 beinh helping me 

 

 

regards

0 Kudos
Message 16 of 26
(1,817 Views)

I did explain it and I already told you where.

 

I also have no idea what you mean about 'tab'.  There is no such thing on any of the VI's

0 Kudos
Message 17 of 26
(1,814 Views)

Hi,

 

With regards to the speed issue, if you change the "timeout" option within the code from 10000 (10 Seconds) to 250 the speed of transmission should increase greatly, if a timeout error occurs increase this in steps of 250 until it operates. Also when you change the format string the output will differ, i.e. %d will show an integer while "test %d" will show the text "test 1" for example. With serial it's normally best, where possible just to send the data you are interested in and provide formatting at the receiving end to limit the amount of data being pushed through the comms.

 

I hope this helps,

 

All the best,

Applications Engineer
0 Kudos
Message 18 of 26
(1,802 Views)

hello sir

 

thanks 4 replyng i got ur point and theres not time delay issue, but sir in an example of tempearture logger is see when i reun the vi a new window open and say to save the file (file name and file location ) after that the vi has perform its function.

 

the file has the complete detailed of incoming data string with there value 

 

kindly sir can u help me to make this 

 

i attached that file 

 

plz recieved that file

 

 

thanks

 

 

0 Kudos
Message 19 of 26
(1,788 Views)

sir 2 rest of the file is uploaded here

 

total 5 files

 

 

Download All
0 Kudos
Message 20 of 26
(1,786 Views)