From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-22-2015 08:29 AM
Hi everyone
I am sending sinewave data from the FPGA -> RT -> Windows.
I also have a square wave and noise option.
The program seems to run fine so far.
My problem is, the waveform chart in the windows PC host VI is completely out of sync with the FPGA data and chart.
I have tried turning off autoscale x-axis and then changing the x-axis values, but soon as I run the VI, the x-axis extreme values jump right back to what they were. It means I am not seeing up to date values.
Any ideas why the waveform chart x-axis seems locked on a particular value?
10-22-2015 08:41 AM
You don't seem to initialize/synchronize your Shared Variables. When your program starts, whatever is in the Shared Variables will be wired to the Chart at 100Hz. Also, you don't seem to have initialized your Chart. Personally, I've stopped using Shared Variables in my code -- I've found them too tricky to get to work in a predictable, reliable way. For communication with an RT Target, I now use Network Streams ...
Bob Schor
10-22-2015 09:00 AM
Ok I will look into network streams as a future topic of development. Thanks.I have noted it down.
What do you think I can do to get this code working?
How can I make the frequency a bit more dynamic as the frequency may change depending on what type of signal is selected.
How do I initialise the chart? I thought it would work ok as it was. Am I better off using the waveform graph or something?
10-23-2015 07:48 AM
Since it sounds like you want streamed data, you should be using a streaming technology. Shared Variables are NOT a streaming technology. They are good for tags (single values that you only care about the latest state of). You really need to change your code to use network streams to get it to work properly.
As far as initializing the chart, use a property node to clear the history (wire an empty array to the History property).
10-23-2015 12:46 PM
10-26-2015 03:51 AM - edited 10-26-2015 04:16 AM
Unfortunately for this particular code, the task itself is to send a control signal from PC -> RT -> FPGA and then return a signal back from FPGA -> RT -> PC, so skipping the RT is not an option here.
Ok I will have a look at network streams and see if I can get it to work.
If you have any specific recommendations for any simple tutorials, that will be greatly appreciated. I will have a google and see what I can find.
10-26-2015 04:38 AM
Another question I have. If I am using shared variable to go from PC -> RT, and using FIFO buffer from FPGA -> RT, and Network Stream from RT -> Windows PC, what is the best method of communication between RT -> FPGA for the control signal?
Shared variables could not be used as they don't allow RT -> FPGA communication.
Its only tag data, so just a control signal stating which type of signal to send back. So its not streaming data.