02-25-2013 06:12 AM
I am using sbRIO and made a VI in which I want to compare a string. If string is matched, it returns true signal and turns on the LED onboard. But the VI gives me an error that functionnot supporte in current target.
Help needed.
02-25-2013 07:10 AM
I'm not sure strings are supported in FPGAs. By definition, strings are variable in size. An FPGA is pure hardware and therefore can't handle variable sized data types. Arrays can be set to be a specific size. Try changing your strings to arrays of U8 (set the fixed size to something you can use).
02-26-2013 10:45 AM
I have a string control where I can type a name while VI is running and it compares it with string constant and returns true. ( Thus turnng LED on)
I want to do same thing on sbRIO FPGA and turn ON its LED.
If you can share a VI where you can show how to convert this variable data to U8 .
02-26-2013 11:09 AM
You can run the following function on the host and pass the array to the FPGA where you can do the calculation. You'd have to pick a maximum array size to fix the interface with the FPGA to a single array size.
http://zone.ni.com/reference/en-XX/help/371361J-01/glang/string_to_byte_array/
If you need to do everythign on the FPGA, you'll need to use byte arrays or some other numeric form directly which will take more work.
03-03-2013 09:32 AM
I have converted my string into byte array. Then I am taking first four values of this array and comparing it. how should I pass this TRUE logic to FPGA where it can turn on the LED?
03-03-2013 09:05 PM
You can pass in the Byte array or the Boolean array. They will just have to be set to a size of 4.