LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting a UDP target FPGA using LabVIEW

Solved!
Go to solution

HI ,

 

I have A FPGA with Ethernet connected to my HOST PC, Now I would like to connect the target FPGA to LabVIEW and access its registers. PLease suggest me.

 

Regards,

Chetan

0 Kudos
Message 1 of 10
(3,466 Views)

Hi Chetan,

 

is it a FPGA target supported by LabVIEW? Or just a FPGA out from the electronics shop?

 

UDP is a standard protocol used to send data. When your FPGA "knows" how to handle UDP you can send messages and receive answers easily. There are UDP examples provided in the example finder...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,462 Views)

HI GerdW,

 

It is a FPGA from out side, it is having a UDP RTL writen inside it. I am connecting the FPGA using Cross wire ethernet cable.

Now how can tringger the communication. Below are the things I know abou the board:

 

1.IP Address of the board

2. Mac Adddress of the board.

3. I know the Address of Registers inside FPGA.

 

Suggets me how do I proceed for accessing the FPGA registers.

 

Regards,

Chetan

0 Kudos
Message 3 of 10
(3,439 Views)

Hi Chetan,

 

1. Read the manual of your FPGA board. Ther eyou should find a list of commands that the FPGA understands or atleast a description of the communication protocol.

2. Start the UDP examples that come with LabVIEW. Follow the descriptions of your FPGA manual when trying to send UDP data...

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(3,429 Views)

HI GerdW,

 

 

Thanks for the Info. I will check the Document and try to communicate with the Board. Base on my understanding I need to send an ARP request to have the communication between the Target board and my Host PC. How can I send a ARP request to target.

 

Regards,

Chetan

0 Kudos
Message 5 of 10
(3,404 Views)

HI GerdW,

 

I got the Data to sent using UDP but I am not getting a proper response for it. Based on my engineers infromation, I should write a 6 Byte data to FPGA (Payload data of UDP).

 

For Example: I need to read  FPGA register of address 0x001, Then my payload will be.

 

in total 48 bits(6 bytes) MSB first bit indicates read or wite here 0 for read.

next 15 will be address that means 0x001

next 32 will be the data for read it can be 0's.

 

Please suggest me here how I can send a 6 bytes of data to UDP. I tried writing the data into UDP Write Function(all 48 bits) and checking the response in UDP read Function I am getting response with the first two bits what I wrote. I have confusion here as the UDP write function is taking string input how can I write UDP Data my 6 bytes. Do I need to send UDP Heder with the Payload data. Please guide me here.

 

Regards,

Chetan.

0 Kudos
Message 6 of 10
(3,385 Views)

Hi Cheetan,

 

convert your 6 bytes to a string before sending:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 10
(3,380 Views)

HI GerdW,

 

Now I am able to send the registers address to UDP.using the method you suggested. I have a qurey here, for reading a address at location 4 my MSB bit should be 0 and I am able to achive by writing 040000 to UDP. Now for write my MSB bit should be 1 and I am writing 840080 but I am unable to write the data into register.Is there any problem in the format I am sending.  plz sugget

 

 

Regards,

Chetan

 

 

0 Kudos
Message 8 of 10
(3,357 Views)
Solution
Accepted by topic author Chetan080

Hi Chetah,

 

dunno, as I don't know your format nor your FPGA's manual...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(3,353 Views)

HI GerdW,

 

Thanks for the support

 

Regrads,

Chetan.

0 Kudos
Message 10 of 10
(3,327 Views)