I am trying to replicate the NREL 5MW controller example. I am generating a Bladed style DLL with C++.
When I send a message to the screen using avcMsg I get a lot of binary characters(?) and some bits of the ServoDyn solve options, but no message. (I can set *aviFail=0 to suppress the output to screen, but I’d like to see some messages during the simulation).
Does any of your intended message appear, or is it all junk?
This appears like some argument isn’t aligning at the interface. The content of the error message looks a bit like it might a garbled form of the avcOUTNAME argument. Can you share the interface info from the procedure in the DLL?
Alternatively, it might be that the avcMSG from the DLL is not terminated correctly. OpenFAST is expecting a C_NULL_CHAR to indicate the end of the message – everything after it is ignored. However, this doesn’t seem like a likely explanation though.
I seem to have fixed the issue. It had nothing to do with OpenFAST, so apologies for that.
What I was doing was converting my c++ string to a char array and then assigning the result to avcMsg. (I’m still not sure why this doesn’t work). The gibberish that results is apparently due to a dangling pointer. (Again, not sure why this happens.)
I replaced the pointer assignment operation with memcpy and it all works fine now.