From: Enrico S. <enr...@we...> - 2011-11-07 17:23:51
|
>In the process of developing a larger application, I'm running my labpython chain in parallel with other LV stuff, making heavy use of images and camera communication >trough a proprietary sdk, that is without having much idea about things happening in hidden threads. I remark that while the labpython part runs smoothly standalone, >once the load is increased I get very often Error 1047 - "LabVIEW failed to send variable to the script server" out of the initial PYTHON Set Data vi, that is routine >lvsnSetLabVIEWData returns with code 1 rather than 0. To recover from the error I can run again in the call chain PYTHON Set script.vi and PYTHON Compile Script.vi. Problem solved. It was not a "load" or a "thread" problem, what caused the disconnection from the script server, but the fact that sometimes I was trying to retrieve from Python a zero sized array, at the end of the previous iteration of the computation. The workaround has been simply to have the python script output the dimension of that array in another variable, retrieve it (PYTHON Get Data.vi) first, and then conditionally retrieve the array only if dim>0. For future memory. |