05-22-2014 02:52 PM
So for what I need to do in the FPGA is send fixed point numbers ±,20,5 to a NI 9146 ethernet chassis with a NI 9264 analog Voltage output as modual 2, it sends -10 to 10m Volts out into a wire. I was creating a FPGA VI and having problems, so I stated devolving my code into the simplist componets, and ended up with the code in the picture attached. The problem is that sending the information to the Mod2/AO4, the channel I am sending it to, takes an infinite amount of time and the signal does not get sent (I have a wire to test if the voltage is set through). From what I have found this is the correct way to send information to the chassis, it works with booleans. Is there something special that I must do for fixed point?
Thank you for your time
Mitchell Worner
Solved! Go to Solution.
05-22-2014 02:57 PM
Why do you think it takes an infinite amount of time to execute? Put an indicator on the iteration terminal and recompile. You should see the values going up. Have you tried changing the value of the control from the front panel of the FPGA VI instead of sending it from the host? Your code looks fine and should work.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-23-2014 08:14 AM
I believed it took infinite time because of previous codes I had. This was just the simplest code I could think of to test. I created a indicator for the iteration and it has not moved from 0 for about 5 minutes.
05-23-2014 11:08 AM
Did you compile the FPGA code? Check for errors from Open FPGA VI Reference in the host code. Or, maybe you're loading the FPGA, but not running it? Can you show the host code? Do you have Open FPGA VI Reference configured to run the FPGA VI after loading, or are you using the Run FPGA method? What about running the FPGA on its own, without the host - open the FPGA VI and click the Run arrow. Does it run? You should be able to type in values and see the output, and also see the iteration indicator update.
05-23-2014 11:20 AM
I am running the FPGA VI alone, no host code. I am just opening the code that you see and hitting run when the correct chassis is connected. This works with NI 9476 (Digital Output) and NI 9205 (Analog Input), which also works when using a host VI. This problem seems to be connected to NI 9264
05-23-2014 01:30 PM
I would create a very simple host VI to poll your 'time(ms)' output- that will tell you if the loop is spinning. While you're at it, you can poll the fixed point value control.
05-23-2014 04:26 PM
The value for the control is tranfering correctly (used a indicator, I think this is what you wanted?)
I know the loop is not spinning, I have tested this several different ways. I have used a sequence structure to know that once it starts to try and output the data to the modual, it gets stopped.
Thank you for your time and help
Mitchell
05-23-2014 04:59 PM
I wonder if there's some problem with your analog output module - have you tried transferring the fixed-point value, doing some simple math on it, and writing it to an indicator, instead of writing to the analog output (removing the analog output entirely from the block diagram)?
What happens if you put another while loop parallel to the one containing the analog output - does that loop run?
05-28-2014 08:33 AM
I have done simple math, and it works correctly.
If there is another while loop besides it, the other while loop still works, which is why this problem took me awhile to notice.
Sorry for the late response, I was out of the lab for awhile.
Mitchell Worner
05-28-2014 11:38 AM
Well, that's pretty weird. Given that the simple math works, it sounds like you're able to transfer fixed-point values from the host to the FPGA normally. How about wiring a constant to the analog output, and seeing if the loop still fails to run? If so, I'd suspect something wrong with your analog output module, or possibly with the backplane (have you tried moving the module to a different slot?). You might need to contact NI directly.