how could i read ASCRll code in labview?

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

how could i read ASCRll code in labview?

Сообщение jinling »

can any one please show me how to read the data sent from PIC is a ASCRll code!!!
am i have to use the Flatten to string to convert the data?
Аватара пользователя
Eugen Graf

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

Re: how could i read ASCRll code in labview?

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

Hi, do you mean ASCII ? Which communication interface (serial, parallel, USB, GPIB, CAN or what esle) do you use?
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how could i read ASCRll code in labview?

Сообщение jinling »

serial port...
when i write a program to PIC then run it...
i can't read any thing from serial port.
i check my pic program is no problem....
i use the basic read n write to test
Аватара пользователя
Eugen Graf

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

Re: how could i read ASCRll code in labview?

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

Take a look on my Easy RS232 Terminal for your test. Look on the serial settings like baudrate and parity, and use cross over cable for communication.
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how could i read ASCRll code in labview?

Сообщение jinling »

stil got nothing come out!!
i use a serial to usb converter will this make a corruption?
Аватара пользователя
Eugen Graf

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

Re: how could i read ASCRll code in labview?

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

May be your controller don't send anything? Did you try if it does using any terminal programm, e.g. windows hyper terminal?
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how could i read ASCRll code in labview?

Сообщение jinling »

where can get hyper terminal for vista?
i am using laptop~~~
Аватара пользователя
Eugen Graf

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

Re: how could i read ASCRll code in labview?

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

There is no hyper terminal for vista. So use my hyperterminal it does the same as windows hyper terminal:
/viewtopic.php?f=18&t=133
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how could i read ASCRll code in labview?

Сообщение jinling »

how to construct the Essy RS232?
here is my PIC program, i think is ok for the program....
unsigned int data = 0;



void main() {


Soft_Uart_Init(PORTC, 7, 6, 9600, 0); // initialize Soft UART
ADCON1 = 0; // All porta pins as analog, VDD as Vref
TRISA = 0xFF; // PORTA is input


do {
data = ADC_Read(2);
Soft_UART_Write(data); // send data via UART
} while (1);

}//~!

it show the value at the PICsimulator, i doubt mayb my PIC got problem
Аватара пользователя
Eugen Graf

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

Re: how could i read ASCRll code in labview?

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

What mean 7 and 6 in initialisation of your UART?
Did you got started my RS232 terminal programm? What does it show? No characters on display?
Your PIC programm seems to be right, I think.
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how could i read ASCRll code in labview?

Сообщение jinling »

Port C pin7 n pin6 is to define theas rx n tx .
i test it using the PIC simultor is alright
i think i have to check with my PIC mayb burn....
i try to run with the easy Rs232, nothing come out
so if i test it by tomolo, izzit i juz need to press connect?
then able to see the data?
Аватара пользователя
Eugen Graf

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

Re: how could i read ASCRll code in labview?

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

If you use my terminal programm you have only to select the interface, baud rate (the same as you use in PIC = 9600) and click on connect button. Than you should see the data comming on serial port.
If you see no data, you have to check your cable (should be crossed). If no data comes, than your PIC doesn't send any ASCII data. If your controller sends non-ASCII data, than you can select HEX display in my easy RS232 terminal.
As I can see on your programm, your PIC sends binary data.
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how could i read ASCRll code in labview?

Сообщение jinling »

hey..i get to read the HEX at the esay _terminal

but some weird there
i give input of data=100 which as hex=0x64
but the result come out at easy terminal is 3737 3737 3737
jinling
beginner
beginner
Сообщения: 15
Зарегистрирован: 03 апр 2009, 07:49
Версия LabVIEW: 8.6
Контактная информация:

Re: how could i read ASCRll code in labview?

Сообщение jinling »

how can i make a scope with v/div and time/div at labiew?
Аватара пользователя
Eugen Graf

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

Re: how could i read ASCRll code in labview?

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

Do you mean the scaling of axes? Use Waveform Chart for this. There you can set all the properties of axes.

OFFTOP I think it's an another topic, so please create a new one in our forum.
Ответить
  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

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