basic serial write and read
-
- beginner
- Сообщения: 29
- Зарегистрирован: 16 янв 2008, 20:55
- Версия LabVIEW: 8.0
- Откуда: malaysia
- Контактная информация:
basic serial write and read
hi..i'm masturah,here i have some problem regarding the labview program.now im working on basic write and read program.i hope anyone out there can help me.below is the example what i want in my program:
write column:
hello
read column:
hello
hello
but what i get now is like this:
write column:
hello
read column:
hellohello
*from here i want the word hello go to the next line..that's all..thank u.for more information,here i attach a file what i have done.
write column:
hello
read column:
hello
hello
but what i get now is like this:
write column:
hello
read column:
hellohello
*from here i want the word hello go to the next line..that's all..thank u.for more information,here i attach a file what i have done.
- Вложения
-
- 1.vi
- (34.49 КБ) 846 скачиваний
-
Eugen Graf
- guru
- Сообщения: 6502
- Зарегистрирован: 13 ноя 2007, 02:20
- Награды: 4
- Версия LabVIEW: 2009
- Откуда: Saarbrücken
- Контактная информация:
Re: basic serial write and read
Hello and welcome here.
I will show your VI today at home and write an answer. It should be not a difficult issue.
Regards, eg
I will show your VI today at home and write an answer. It should be not a difficult issue.
Regards, eg
-
Eugen Graf
- guru
- Сообщения: 6502
- Зарегистрирован: 13 ноя 2007, 02:20
- Награды: 4
- Версия LabVIEW: 2009
- Откуда: Saarbrücken
- Контактная информация:
Re: basic serial write and read
So, here is the screenshot of your block diagram.
1. which device do you want to communicate?
2. do this device send a carrage return and line feed on the end of line?
3. can you capture some lines with a easy serial terminal programm like windows hyper terminal?
If end of line is present you have to enable the Termination Character configuring VISA and remove the property Bytes On Port before reading.
If you want to sample all answers from devce you have to use a shift register to save the data of previous readings and add the new answer to them.
1. which device do you want to communicate?
2. do this device send a carrage return and line feed on the end of line?
3. can you capture some lines with a easy serial terminal programm like windows hyper terminal?
If end of line is present you have to enable the Termination Character configuring VISA and remove the property Bytes On Port before reading.
If you want to sample all answers from devce you have to use a shift register to save the data of previous readings and add the new answer to them.
-
Eugen Graf
- guru
- Сообщения: 6502
- Зарегистрирован: 13 ноя 2007, 02:20
- Награды: 4
- Версия LabVIEW: 2009
- Откуда: Saarbrücken
- Контактная информация:
Re: basic serial write and read
Ok, I changed "your" VI to a easy serial read write VI. It should work undepandantly of the used protokol.
- Вложения
-
- 1.vi
- (30.95 КБ) 888 скачиваний
-
- beginner
- Сообщения: 29
- Зарегистрирован: 16 янв 2008, 20:55
- Версия LabVIEW: 8.0
- Откуда: malaysia
- Контактная информация:
Re: basic serial write and read
sorry..i even notice that i send u a wrong file.here i attach the correct file and i have the same problem..thanks a lot for your co-operation.and i use labview 8.0.thank u again.i really appreciate it.
- Вложения
-
- try1.vi
- (33.71 КБ) 843 скачивания
-
- beginner
- Сообщения: 29
- Зарегистрирован: 16 янв 2008, 20:55
- Версия LabVIEW: 8.0
- Откуда: malaysia
- Контактная информация:
Re: basic serial write and read
1. which device do you want to communicate?
**to answer ur question i use serial loopback as a device to communicate
and i want to ask how i want get the result as below:
write column:
hello
read column:
hello
hello
thank u
**to answer ur question i use serial loopback as a device to communicate
and i want to ask how i want get the result as below:
write column:
hello
read column:
hello
hello
thank u
-
Eugen Graf
- guru
- Сообщения: 6502
- Зарегистрирован: 13 ноя 2007, 02:20
- Награды: 4
- Версия LabVIEW: 2009
- Откуда: Saarbrücken
- Контактная информация:
Re: basic serial write and read
What do you think with a serial loopback, did you connect the pin2(=TX) and the pin3(=RX) of your serial interface on PC? If yes, than why you want to send 1 word and want to get 2 words?
-
- beginner
- Сообщения: 29
- Зарегистрирован: 16 янв 2008, 20:55
- Версия LabVIEW: 8.0
- Откуда: malaysia
- Контактная информация:
Re: basic serial write and read
instead of using serial loopback i also use maxstream wireless kit.serial loopback is just for testing.what i want is the data that receive can read continuously.the file i attach before which try.1 can read the data continuously when i run continuously.i hope u understand what i mean.thank u for ur co-operation.
-
Eugen Graf
- guru
- Сообщения: 6502
- Зарегистрирован: 13 ноя 2007, 02:20
- Награды: 4
- Версия LabVIEW: 2009
- Откуда: Saarbrücken
- Контактная информация:
Re: basic serial write and read
Is it this one?
http://www.rabbit.com/products/WC_App_Kit/
Really important is to know if the device sends an end of line after every answer. If yes, than you have to enable the termination character in the configuration (first white VI).
If you have a easy loopback, than try my example VI, it should good work with a loopback. All, what you send, you will receive. So if you send:
hello
You will receive the same:
hello
Do you have an documentation or protokoll description of the device as PDF?
http://www.rabbit.com/products/WC_App_Kit/
Really important is to know if the device sends an end of line after every answer. If yes, than you have to enable the termination character in the configuration (first white VI).
If you have a easy loopback, than try my example VI, it should good work with a loopback. All, what you send, you will receive. So if you send:
hello
You will receive the same:
hello
Do you have an documentation or protokoll description of the device as PDF?
-
- beginner
- Сообщения: 29
- Зарегистрирован: 16 янв 2008, 20:55
- Версия LabVIEW: 8.0
- Откуда: malaysia
- Контактная информация:
Re: basic serial write and read
here i attach a pdf of the device.serial loopback is for testing.i buy rs-232 and connect pin 2-3 and pin 7-8 to make a loopback.afterthat the loopback i connect to usb cable then connect to my pc.ok then i want to ask u something,how i want to do like this program.
write column:
hello
read column:
hello
then,
write column:
how are you?
read column:
hello
how are you?
*if u notice i want "hello" to be appear at read column if "how are you" enter the read column.this like a chatting application.ur example i have try.but i don't know why it doest'n work.but i really hope u can fix this problem.thank you.
write column:
hello
read column:
hello
then,
write column:
how are you?
read column:
hello
how are you?
*if u notice i want "hello" to be appear at read column if "how are you" enter the read column.this like a chatting application.ur example i have try.but i don't know why it doest'n work.but i really hope u can fix this problem.thank you.
- Вложения
-
- quick-start-guide_XStream_OEM_development-kit.pdf
- (614.64 КБ) 755 скачиваний
-
Eugen Graf
- guru
- Сообщения: 6502
- Зарегистрирован: 13 ноя 2007, 02:20
- Награды: 4
- Версия LabVIEW: 2009
- Откуда: Saarbrücken
- Контактная информация:
Re: basic serial write and read
Hello masturah, please try this easy terminal VI.
And look this screenshots and attached VI:
/viewtopic.php?p=103#p103
And look this screenshots and attached VI:
/viewtopic.php?p=103#p103
- Вложения
-
- Terminal.vi
- (81.13 КБ) 1035 скачиваний
-
- interested
- Сообщения: 3
- Зарегистрирован: 06 июл 2011, 23:54
- Версия LabVIEW: 8.0
- Контактная информация:
Re: basic serial write and read
Hi Eugen,
I am a Chemical Engineer with very little familiarity to computers. I have started using Labview 8.0.
My task is to read a Denver Instrument Mass Balance data into a Labview interface. I have created a vi using the "basic serial write and read.vi". But it is returning only the number of bytes and not the mass data on the balance.
I am using a RS232 port and the vi is working without any connection problem. I think there is some logical error. Please help. I have not made any changes in the vi mentioned above. But it is only reading the bytes.
Please help
Subhayan
I am a Chemical Engineer with very little familiarity to computers. I have started using Labview 8.0.
My task is to read a Denver Instrument Mass Balance data into a Labview interface. I have created a vi using the "basic serial write and read.vi". But it is returning only the number of bytes and not the mass data on the balance.
I am using a RS232 port and the vi is working without any connection problem. I think there is some logical error. Please help. I have not made any changes in the vi mentioned above. But it is only reading the bytes.
Please help
Subhayan
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
- 5 Ответы
- 847 Просмотры
-
Последнее сообщение dadreamer