03-12-2018 01:13 PM
I am trying to create a C API to use with a cRIO, but I am very new to this and am missing something. I have attached the VI that I am working with.
The loop iteration indicator shows me that the loop is definitely executing continuously, but the probes that I set on anything inside the loop are telling me that nothing inside is ever executed. What am I missing here?
Also, because of this I cannot tell yet if my FIFO stuff is working as intended - to set the analog channels via C++ with the generated API. I tried a simple control but when I generate the C API I get the message that they are not compatible or something and as such were not included in the API. My googling led me to FIFO. If anyone sees that this will not work as I hope, I would appreciate any preemptive fixes or advice.
I am using LabView 2015 with a cRIO 9063. The modules installed are 9263, 9212, and 9401. I am not the 'main' LabView user in our workplace, but the guy that normally does this is out so if I'm missing any information just let me know and I'll try to find it.
Solved! Go to Solution.
03-12-2018 02:52 PM
Not really sure what you are trying to do. I do not think you need the FIFOs. You could just write the values right to the AOs.
03-12-2018 03:25 PM
I am just trying to generate a C API so that I can use C++ with our cRIO. I did try a regular control for the analog channels, but the C API Generator gives me a warning that the control isn't supported and so it was omitted from the header file. I attached a screenshot of the control and message. That is why I am using FIFOs.
Also, any idea why nothing inside of the loop executes?
03-13-2018 10:50 AM
Ok, I found a solution here! My problem was that the C API cannot use LabView FPGA controls or indicators that are fixed point, so any fixed point controls or indicators (in my case analog setters and thermocouple readers) have to be converted to integer types in order for the FPGA Interface C API Generator to include them. Once you access them in your C or C++ code, they can then be converted back to fixed point types.