06-03-2019 07:35 AM
I have created a DLL with the LabVIEW code which accepts a cluster as args. This cluster contains a 2D array of unsigned integers(uint8) and a double. This DLL is working when I use it in LabVIEW. But, when I tried to use the DLL in Python it shows "OSERROR: Access violation at 0X0000001". I suspect that the DLL is not able to read the input cluster itself. Any suggestions on what should be done to make it work?
I have attached the Python code, LabVIEW DLL, .H file and the LabVIEW project I used to create the DLL.
06-03-2019 08:43 AM
Pretty sure this thread solves your issue 😉
06-04-2019 01:29 AM
Hi PeanutButterAndLabVIEW,
I have gone through the link.They are trying to pass cluster from python to LabVIEW VI.But in my case it is DLL. So it is not solving my problem.
Thanks anyways.
06-04-2019 02:58 AM
This is really more a Python question then a LV question, but as the dll is build in LV, it's probably the best place to post.
AFAIK, 2D arrays are not really 'defined' outside LabVIEW. 1D is standard, nD isn't. Python probably uses another format that is passed to LabVIEW.
Have you tried something simpler before trying the 2D array? Begin with a scalar, then a 1D array, then a 2D array. Just so you know everything else is working.
If everything but the 2D array works, you'll have to look for a way to transfer the 2D data to LabVIEW. This means either modify the data in Python so LabVIEW accepts it as 2D array, or modify the dll so it accepts a 1D array, and make Python flatten the data to 1D...
06-12-2019 05:52 AM
Hi wiebe@CARYA,
Sorry for the late reply.
Will try out everything you said and will post the update.
Thanks.