Thanks for the reply DJ-
What I was trying to do was handle an error if the user were to ask for
a board that didn't exist (for example, using board ID 2 when the only
legitimate board ID was 1). It looks like there were several
problems:
1) The error returned was -72401, when the error should be in the -70012 (illegal board ID).
2) Using the C library
flex_read_error_msg_rtn call did not return the text description of the error.
I think I've got it together now, but I still don't know why the 2
problems above are happening. In any case, I'll talk about what I
did, and what I've got now.
I was trying to initialize motion control using a C dll. If the
board ID was wrong, I wanted my error handler to catch the error and
return the text description of the error. All of the library
calls returned the error code -72401 when the board ID was wrong.
This error code is not documented, so I didn't know what it was
doing. The error handler used the call
flex_read_error_msg_rtn
which takes the error code, some other error info and the address of a
space in memory for a string. The string was never filled with
the text of the error code.
So, I rewrote the error handler to return the error code rather than the string to get around flex_read_error_msg_rtn
not returning the string. Somewhere along the way the -72401
error stopped occuring and was replaced with -70012, the proper error
code for 'illegal board ID.'
So, problem 1 'got better' and I worked around problem 2. I'm not
exactly sure what I was doing wrong, but I'm moving on now.
Thanks,
Casey