Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Giving a boardID of 2 for a 1 PCI-7334 system gives a -72401 error

I have a 1 card PCI-7334 motion conrol system.  Giving a board ID of 2 sends a -72401 error.  I would like to catch this, and other, errors so my users don't cry every time they try to use my system.
 
This error is not handled by flex_read_error_msg_rtn in MS Visual C 6.0 or the Labview 'Motion Error Handler.flx.'  It is also not documented in the flex motion installation documentation or on ni.com.  How am I suppose to handle this error?  Did I miss a location or mess up a search for the error code somewhere?
 
Please help.  Thanks,
Casey
 
 
0 Kudos
Message 1 of 5
(3,627 Views)
Hey Casey,
 
From what you have posted, I see that you are getting the error -72401 when you try to give your PCI 7334 a board ID of 2. But I am not sure as to when you are getting this error. Are you trying to set the board ID in the Measurement and Automation Explorer (MAX), or are you trying to change it in a program? What version of the NI-Motion driver are you using? Do you get a description with the error, like bad board ID or anything like that? Are you calling the Get Motion Board Info function when you are getting this error?
 
If you haven't changed the board ID in MAX, you can do this by right clicking on your board under Devices and Interfaces. When you right click on your board, there should be an option called "Change Board ID..." if you are using the most recent version of the NI-Motion driver (currently most recent version is 7.0). Once you have set up your board ID in MAX, you can then change the board ID value in your code to match your PCI 7334. If you are getting the -72401 error in your code, it might be because your board has a different ID associated to it, and therefore won't let you run your program properly. This error shouldn't appear if your board ID and the ID you use in your code match up properly. Also, have you tried any other board ID numbers other than 2, (like 3 or 4,) and do you get the same resulting error? If you could give a few more details to let us know exactly what is going on and when they are occurring, it would help us help you resolve this issue. Try changing the board ID in MAX and see if that helps, if you haven't done so already.
 
I hope this helps. Let me know if you have any questions. Thanks, and have a great day.
 
Regards,
DJ L.
0 Kudos
Message 2 of 5
(3,620 Views)
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

0 Kudos
Message 3 of 5
(3,593 Views)

Hi,

Although I have'nt tried to handle the error of invalid board ID, but I suggest u something that I do to avoid such a problem. I give the board ID as a constant in my program. And the user is not given the control to change the board ID. So the problem of invalid board ID is automatically solved, as the user does'nt have access to it.

Regards,

Giridhar Rajan

Automation Engineer

Cruiser Controls

Mumbai, India

0 Kudos
Message 4 of 5
(3,558 Views)
Thanks Giridhar-

That is a goodsolution, except that I don't know the users hardware configuration before hand.  I have a number of different users, with a variety of hardware configurations.  In order to try to isolate the user from this problem, I detect what devices are on the bus (in DAQmx) or I scan the entire bus and see who answers (traditional DAQ) and then present the user with choices of the appropriate hardware.

So, the C dlls should never get an invalid boardID, but in the name of good coding practice, and in order to make it much easier to debug the code if there is a hardware related problem (particularly in the field) handling all of the errors is a good idea.

Thanks,
Casey


0 Kudos
Message 5 of 5
(3,546 Views)