LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication Problem

AA,

well in my project i tried to link between Labview as a software and A FPGA board as a Hardware implementation
the link between the labview and the FPGA board is a serial line connecting both sides ... as a test for the UART VHDL Code loaded on the FPGA we use the Hyper-terminal to write on the serial port and observe the equivalent binary representation received on the FPGA Leds also we perform the read test by generating a binary sequence using sliding switches in FPGA board and observe the O/P on the hyper-terminal both tests are correctly working.

Next phase is to do the same tests but using a (Basic serial port  Write & Read.VI) Example in LABVIEW instead of Hyper-terminal...
the following are introduced:

1- Read test .....OK working properly [No problems]
2- Write test ..... the equivalent binary format for the written strings on LABVIEW is not Matched to the received Binary format on the FPGA board LEDS for example:
                           the binary representation for the string A is 100 0001 as in ASCII code table  ==>  100 0001 101 65 41 A

 
                           But on the FPGA board the received sequence is 100 1011
                           the two underlined bits are always one in all strings wtever the string written on LABView
                           I don't know why ....???!!

In my project the signal required to be TX over serial line is an analog pulse signal then i used the analog to digital.VI converter in waveform Palette in lab view then the digitized o/p is connected to a Digital to Binary array .VI in waveform Palette>>digital converter subPalette
since the VISA write takes strings only i used a Byte Array to string.VI in string Palette.

Are these conversions are correct ....??!! or i lost the signal i mean it's changed

=> if correct then when i write this signal on the port and receive it again. the received signal is a shifted version of transmitted signal and the full scale pk to pk is sticked to 2 evenif i changed it using a controller....??!!
why the shift ....and why fixed pk to pk ....??

Last question is in the Digital to binary Array.Vi when i try to adjust it to Digital to 8bit binary Array => simulation stopped and an error message is showed up telling me that there are large number of data to be represented.
How can i resolve this error coz my data should be 8 bit not 16 or 32 bit ....???!!!

Attached to this POst my LabVIEW code . 
  

Thnx in advance
Sherif farouk (",)
-----------------------

0 Kudos
Message 1 of 2
(3,896 Views)
Hi Sherif,

What kind of FPGA board are you using? If you have confirmed from the write string indicator that 100 0001 is what is being written, then it seems like there could be something wrong on the FPGA side. Have you checked its documentation?
Nick R
NI
0 Kudos
Message 2 of 2
(3,672 Views)