03-20-2008 09:46 AM
03-21-2008 04:21 PM
Hello Frank,
There is some scaling that is applied to the I16 datatype. We assume the full range of the I16 corresponds to the range -10 to +10V, which matches the data returned from an analog input. So if the value of the I16 is -32767 we scale that to be a -10 V, -16384 is -5V, 0 is 0V, and 32767 we scale it to be +10V. This scaling is applied to any indicator or control that we read or write from the FPGA VI that is an I16.because this matches the data returned from the FPGA analog inputs. This was intended to match the data to this range in a logical way.
To avoid the scaling I recommend using the Fixed-Point datatype (which was recently added to the LabVIEW environment) rather than the I16 in your FPGA VI. You can configure the datatype to be signed and have 16 bit word length and integer word length. This will give you the same range as the I16 and no scaling will be applied.
Let us know if you have any more questions about this.
Regards,
Angela M
Product Support Engineer
03-25-2008 01:55 AM
Thank you Angela,
That makes it more clear to me, but still I have a problem with it.
When I make a contstant (I16) in the FPGA with for example the value 4000, and connect this via the SIT manager to the the Simulink DLL. I get nothing else than zero (or I get nothing?).
But I will try the sugestion off you with the fixed-point data type.
Thank you verry much
Frank
03-26-2008 10:06 AM
Angela,
The work around with the fixpiont type did not work, but thanks to your reply, I now know that I have to convert it in simulink.
With the kwonledge of the conversion to Volts, I looked again at the values in simulink (comming from the FPGA), but I see that some of them are converted to volt but some of them are not.
So there are some values wich are not or incorrect converted. How is this possible.
All values output in the FPGA are I16 and the input values in simulink are now double.
Regards
Frank
03-26-2008 10:51 AM
03-27-2008 04:30 PM
03-28-2008 02:59 PM
03-31-2008 03:49 AM
Angela,
The values are complete nonsense.
I read the values in the simulink model back via the SIT manager into a windows vi, so I can see them.
I will try to read the values of the FPGA in the driver vi ( I do not know how to, but I will find out)
Regards
Frank
03-31-2008 08:09 AM
Hello Frank,
If you have a support contract you can call in and talk with one of our applications engineers, they will be able to help you with your troubleshooting and probing in the driver VI. You can find the contact information but clicking Contact NI in the bar at the top of any ni.com webpage.
Regards,
Angela M
Product Support Engineer
04-01-2008 12:27 PM
Angela,
I have support and and they know about the problem, but I did not get any answer yet (It is to complicated)
I looked in the driver and the values are the same as in simulink ( some are correct and some are nonsens or 0).
I have in total about 350 connections to simulink, is this perhaps the problem (65 inputs and 295 outputs) and can this then be solved by using array's or cluster.
What is the total maximun possible connections to simulink,
Regards
Frank