how to read multihannel from RS232 in ( pic to RS232)

VISA; TCP/IP, CAN and similar protocols
Ответить
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

how to read multihannel from RS232 in ( pic to RS232)

Сообщение jinling »

i am doing a EEG project, this is my block diagram

10 channel EEG amplifer --> ADC--> Pic--->RS232--> Labview
as we know RS232 is a 8 bit serial port, so how can i read back my 10 chaneel in labview?
what should i use to seperate?
use array or use time for delay?
or choose the channel that i need to read?

please , give me help on this issue.

thanks lot

jin
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение Eugen Graf »

Hi, please take a look on this simple example:
/viewtopic.php?f=14&t=328

So you can use the same VI for reading arrays of 10 values instead of one.
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение jinling »

sorry...i not really understand the the Vi u attached.
izzit i can use this as example to make modify at visa read n visa write??
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение Eugen Graf »

This example shows you, how you can transmit data from one PC to other PC using serial port. In this example two numbera per each read/write operation will be transmitted. If you modify them for 10 numbers, you will be able to transmit your all 10 channels.

Oh, I am sorry, that was a wrong example. Here is the right one:
/viewtopic.php?f=22&t=24
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение jinling »

ok ..i think there is something i use in there.!!
which i need to modify so i can display al 10 channel.?
wat u mean is i have to change the array type ???
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение Eugen Graf »

In fact you don't need to modify the Read VI. Easy send an array with 10 values, and they will be shown in a graph on the receive side.
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение jinling »

hey a sample i have done to read the value!
i use loopback to make as a reference.
so how should i do the make selector channel to sent to the PIC, i knwo use write function.
wat type of data it sent back to the PIC? in ascll or in binary??
n how do the PIC know?

thanks for help !!!
Вложения
tesing 1.vi
(19.34 КБ) 510 скачиваний
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение jinling »

if use binary to as the message sent to PIC or i change it to hex string?
so if i doing this am i rite?
i have check the output it can produce the Hex or Binary, juz need to make changes on format string.
Вложения
port write.jpg
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение Eugen Graf »

Hi, I don't know which communication protocoll understands your PIC. Have you documentation for this?
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how to read multihannel from RS232 in ( pic to RS232)

Сообщение jinling »

thanks lot for the help.
i get to read the 3array data by using the loopback.vi by short pin2 n pin3 rs232 for testing.
i am able to get back the result which same as my input n also the graph in 3 channel.
again thanks lot got the help.
now need to do the save n read file.
i think this should be no problem.................
THe problem now i have is, how to make a program code for mikroC to read the 8 channel data in array.
once it is done, i will release from tension n pressure..

thanks lot for ur help :)
best regard
jin ling
Ответить

Вернуться в «Communcation with devices»