LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Data Acquisition

Hello LabVIEW community,

I am wondering if anyone has any tips on data acquisition using USB C SPI from an FPGA. The FPGA that I am using is a DE 10 Lite. 

- The data transfer rate is 5 kHz

- Data format -  160 bit Hexadecimal

More info on interface:
I am using this data for a phasor measurement unit interface. This interface converts the data from hexadecimal to decimal to display on the charts. The interface must take the data into a 5 second buffer in order to write the data to a file in the event of a fault. In the event of the fault the buffer will be triggered to write 5 seconds of data before the event and 5 seconds after the event. I have completed the programming to convert the data into a usable format however I am now at the stage of building the data acquisition section of the interface. Any advice on building the FPGA data acquisition module and building thr buffering system would be greatly appreciated. I have attached a table for the data format and a copy of my code. Let me know if you need more information.

 

PMU values

Data type

Alarm

Time (MDH)

Time
(min sec)

Time (20 usec / count)

V

f

(°)

F

(Hz)

RoCoF

(Hz/s)

CS

bits

4

6

14

12

16

24

24

24

24

12

Data type

us

us

us

us

us

us

s

us

us

 

Comment

2 or 3 toggles

 

Mth(4)Day (5) Hr 5

2x6bit

 

 

 

top 5 bits Hz

 

 

Max Value

 

 

12 (M), 31 (D),24(H)

60, 60 = 1Hr

50000 = 1sec

287.5V

360

64 Hz

128

 

Max PU

 

 

 

 

 

1.25 = X"FFFFFF"

 

1.28

 

 

Min Value

 

 

 

 

 

0

0

0

-128

 

Type Value

1

 

 

15 30

 

1pu = 230V

90 deg

50 Hz

0 Hz/s

 

Type Data (hex)

1

 

 

0F1E

 

CC CCCD

40 0000

C80000

0 0000

 

Res

 

 

 

1 sec

20 us

17uV

21 udeg

3.8 uHz

244 uHz/s

 

GPS data

Data Type

Alarms (spare)

Date

 Time

Latitude

Longitude

CS

bits

4

4

24

32

40

44

12

 Typ Value

4 or 5, toggles

 

19-Oct-22

2:14pm 10.45 sec

Location Adelaide

 

 

Hex value

 

 

191022

14141045

34.92850 (S)

138.6007 (E)

 




Regards

0 Kudos
Message 1 of 5
(335 Views)

Are you looking for general advice on the topic, or is this in any way related to LabVIEW or NI?

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 5
(324 Views)

Hi Santhosh,
Thanks for your reply. I am looking for advice on what blocks to implement into my labVIEW code in order for me to be able receive the transmitted data from the FPGA. I am wondering if anyone has had a similar experience in interfacing this FPGA with labVIEW.

https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=234&No=1021


Thanks

0 Kudos
Message 3 of 5
(310 Views)

You can communicate with FPGA or MCU dev boards over USB-SERIAL converters, which typically come with the dev board. As an embedded developer, you must formulate a simple, efficient data format that allows LabVIEW and the firmware to handshake and exchange data.

 

Depending on the level of flexibility/configurability, your implementation of LabVIEW (using VISA) and firmware would vastly vary.

 

This is great for getting started if you're new to Serial communication.

https://labviewwiki.org/wiki/VIWeek_2020/Proper_way_to_communicate_over_serial

 

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 5
(301 Views)

This is less of an FPGA question and more of an instrument driver question.

 

See also https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x3XpCAI&l=en-US

 


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 5 of 5
(256 Views)