05-05-2014 10:05 AM
Once you have created the array (which it sounds like you are able to do), just wire an array with the appropriate value to the "Value" property of the ArrayConstant class.
05-05-2014 10:20 AM
Thank you. That turned out to be much simplier than I thought. 🙂
05-06-2014 03:29 AM
How can I generate (using LabVIEW VI scripting) FPGA Math & Analysis (High Throughput Math) function?
For example, as mentioned previously in this topic, divide function.
05-06-2014 09:55 AM
The high throughput math function is not a normal node, so there is not a good way to generate it from scratch (the functions are private, for good reason). Your best bet is to create a template like I suggested above and move a base version of the code from a template into your final code, then use the functions Darren pointed out to configure it. Good luck!
05-06-2014 10:29 AM
I agree with Damien, you should be using templates to drop these things. But if you must drop one from scratch, you can wire the path to the source file to the New VI Object function:
If you search the vi.lib\rvi\FXPMathLib folder for *.xnode, you should find the source files for all the HTM nodes. I'd like to reiterate here that all of this scripting functionality is not officially supported by NI.
05-08-2014 05:58 AM
Till now I have created VI script that generates High Throughput Math Divide function (added attachments).
But is how can I add my x and y inputs (Controls) to this generated function in my VI script?
05-08-2014 07:07 AM
After you have finished scripting the node (your commit function), get a reference to new node, then use the Terminals[] property of the node to get references to all the terminals. Use the Is Source? property on each terminal to find out if it is an input or output. Then use the Create Control or Create Indicator method to create controls and indicators. You can use the terminal Name property to filter whether or not you create a control/indicator.
05-09-2014 11:01 AM - edited 05-09-2014 11:26 AM
That works for High Throughput Divide function generation, but is it possible to generate Memory Method Node and set it's data type to fixed-point?
I added photos of my VI script and the generated VI.
Maybe one more time somebody can explain me that?
05-09-2014 02:10 PM
You need to use the VIs in vi.lib\rvi\ClientSDK\Core\Script\Memory\ProjectItem to create the Memory item in the project. This includes setting properties like the data type. Once you've done this, you'll use the VIs in vi.lib\rvi\ClientSDK\Core\Script\Memory\XNode to drop a method node that references the memory node you've already created and configured in the project. I don't know what purpose it serves to try to configure the data type on the node itself, since that's defined by the project item.
Also, you'll want to wire a numeric constant configured to the FXP type you want to the "Data Type 2" instance of the Set VI. The enum that has an "FXP" entry doesn't let you configure the word length, integer word length, etc. of the FXP data type.