I have attached some example codes i have for python as well as the mirror control VI i am trying to run on LabVIEW. I also put in the edac40_sdk which contains some of the executables like am_set . I hope some of this helps.
Look the file provided by the company had all of those files in it. Theoreticaly you can control the mirror with matlab or python or labVIEW and each one uses different libraries but they all more or less contain similar functions.
I have to do it with labview. Most of the functions in the dll work properly except the ones that actually comunicate with the mirror and set voltages. They return a 1097 error which i don't know how to fix. But for example the executables that are in the edac40_sdk file are all succesfull in controling the mirror, so it is not a communication problem between the pc and the device.
wiebe@CARYA asked for some example code or executables so i though i'd send these. I'm not sure if they are helpfull but i don't have anything else.
The problem with this is that we can't just go and sift through all this and try to check it all. For one it's a ton of material and we have real jobs to do that pay the bills. Second none of us has this hardware so we couldn't even test anything if we wanted to.
This means you have to do the testing, debugging and reporting of where things go wrong. And point out where the relevant documentation is that relates to a function you are testing and seeing a failure. Just thorwing out all the information you have is about as helpful to your cause than publishing the entire contents of the bible somewhere. Nobody is gonna read that!
Error 1097 is the LabVIEW catch all error for the Call Library Node. It basically means that something has violated the integrity of the LabVIEW process. How and what that was is almost impossible for LabVIEW to determine so it sweeps it all under this single error. It can be that you configured something wrong in the Call Library Node so that LabVIEW passes a different datatype to the DLL than it expects and accesses accordingly wrong memory. It could be also that you configured it right but dit not provide a "large" enough memory buffer for a string or array that the DLL function wants to write into. Or that the DLL simply accessed invalid memory due to a bug in it or wrong parameters passed to it.
I understand that you have real jobs and as i've said before I really appreciate you taking the time to reply to me.
I have already send the vi i am working on as well as the documentation i have on the library that it calls. it's just a 3 page pdf with the library functions. The thing is i am very new to programming alltogether and i am not sure what are the steps i need to take to find what causes the error and fix it. i would be happy to do all the testing and debugging i just don't know what i need to test exactly or how.
For example i am pretty certain that the call library function node is configured correctly, but when you say i did not provide a large enough memory buffer what does that mean and how do i change it or provide a "larger" memory buffer?
It's still pretty unclear to me what all these components have to do with each other.
- Your VI accesses some sort of DMC interface or something inside a plug_feedfwd.dll. This supposedly gives you the 1097 error.
- The Python code accesses a okdm.dll file with okdm functions.
- The SDK is about an EDAC40 device, which seems to be yet another thing. The SDK provides the source code for the edac40.dll which appears to be more or less just some UDP and TCP communication so could also most likely be implemented all in LabVIEW using the network nodes. However I hesitate to recommend that approach as converting C network code to LabVIEW isn't a very trivial step, even if you understand both C and LabVIEW fairly well. The protocol is rudimentary described in the PDF too, so it would not be that complicated really.
Still, there are three components involved that seem to have nothing to do with each other, and none gives extra information about the DMC API that you try to access in your VI. So there is really nothing we could go by to help you further.