01-03-2014 04:24 AM
Hello,
I try to call a function using CLFN. My problem is the parameters of the function I try to access.
Here is the function and his parameter:
typedef struct { int major; int minor; int revision; int build; } VersionNumberType; int Comm_BTE_softVersion( VersionNumberType *pVersion) { BYTE byBuffer[2048] ; if( !Comm_BTE_readYMem( byBuffer,COMM_BTE_TX14_SOFTVERSIONADDR, COMM_BTE_TX14_SOFTVERSIONSIZE)) { return FALSE ; } //. process the answer pVersion->major = (int) (byBuffer[0] & 0xFF) ; pVersion->minor = (int) (byBuffer[1] & 0xFF) ; pVersion->revision = (int)( byBuffer[2] & 0xFF) ; pVersion->build = (int) ((int) ( byBuffer[4] << 8) ) | ((int) ( byBuffer[5] )); return TRUE ; } //. end Comm_BTE
In attached file there is the Comm BTE soft Version.vi that try to access this function. The code crashes when the function is called and labVIEW is closed.
I probably don't pass the data parameters correctly to the CLFN.
Thanks for help.
Regards. NewCLAD.
Solved! Go to Solution.
01-03-2014 12:34 PM
Everything is configured correctly EXCEPT the numeric representation of the values in the cluster. They must match int, which is most likely 32 bits on your platform. In your VI, they are U8.
01-04-2014 03:18 PM
Thank you nathan,
It seem's that everything's working properly now.
Best regards