LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO with GXML

Hello, I am using a cRIO 9073 with a 9215 DAQ module and a NI 9467 GPS module. I am acquiring 128 samples every 10ms from a signal generator which I have set at 50Hz. The samples are transfered with their GPS timestamp through a FIFO from the FPGA to the Real - time environment. There (at the Host), the samples are converted to ASCII in order to become in a readable format. The problem occurs when I try to generate an XML  format from the obtained ASCII string. By the time I enter the GXML generator VI's the waveform crashes (I am obtaining at the host). When I don't use the GXML blocks everything works fine. I would much appreciate any ideas on why this is happening.

Download All
0 Kudos
Message 1 of 3
(2,253 Views)

Hi,

 

I am asumming that you see the problem once you add the XML Format subVI into the host VI. My suggestion is that you put the XML format subVI in a separate while loop. Then use the producer/consumer design pattern to pass the string data from the loop which does the read to the XML format loop. You can see the link below for more explanation on such design pattern:

 

http://www.ni.com/white-paper/3023/en/

 

To start off quickly, search for the example called Simple Queue.vi. The producer/consumer design pattern uses queues to pass data between loops without using wires or variables. This way both loops can run independantly.

 

The reason I suggested to put the XML format subVI in another loop as I suspect that it is a bottle neck when you try to pass data that you acquire from the FPGA target. Try this out and see if it works.

 

Regards,

Alan 

Applications Engineer | National Instruments
Singapore (65) 6226 5886 | Malaysia (60) 3 7948 2000 | Thailand (66) 2 298 4800
Philippines (63) 2 659 1722 | Vietnam (84) 28 3911 3150 | Indonesia (62) 21 2783 2355
0 Kudos
Message 2 of 3
(2,224 Views)

Hi ASEAN, 

 

Thank you very much for your answer! Unfortunately it seems that it doesn't solve the problem. I have attached the changes I made according to the Producer/Consumer pattern. 

 

I checked the CPU usage ( Ni distributor) there is nothing seem to be wrong there. 

 

It seems that it doesn't have to do specifically with the GXML vi's. When I deleted them and ran the VI with just the Queue blocks it crashed as well but after a while.

From what I understand the more code I add the quicker it crashes. Any additional suggestions?

 

 

Download All
0 Kudos
Message 3 of 3
(2,215 Views)