View Full Version : API Programming Anyone


Al_The_Man
02-13-2005, 01:29 PM
I wondered if anyone can give me a brief run down on what I am likely to be able to do and recomendations in the way of programs/books etc.
I have aquired a new Motion control program I would like to test on the next retro-fit I do, it is Win NT, 2000, XT based.
At the end of the manual there is a 20 page API users guide, but it is cryptic and no examples supplied.
A DLL file is supplied together with a list of command groups and just mentions in the manual that a working knowledge of the natural lanquage of the Motion card is necessary (I have that) and should be attempted by experienced developers ( hopefully I will attain that). The motion control program is already fairly complete but there are some custom options I was hoping to include, that the present programming is lacking.

But having a brief knowledge of VB I wondered if any one that has done any kind of API programming could give me a rough idea how much customization etc I am likely to achieve using either VB or C++? I know this may be difficult without knowing the exact application etc, but I just want to broaden my limited (read none) knowledge of API before jumping in.
Al :violin:

JRoque
02-14-2005, 01:02 AM
Hey Al. I've done some VB programing and called API, etc. Almost always there's some cryptic entries in there that are a bear to crack. Too bad they don't include an example. For the most part, however, you just need to declare the API calls (usually in a module) and then call it from your main code. I would watch out for calls that require near realtime processing as VB has layers upon layes of wrappers that cause delays and other timing issues. C will be a better option for time-sensitive tasks.

JR

kdoney
02-14-2005, 08:48 PM
I assume you have the source code for the motion control program? Some motion controllers (hardware) come with a packaged program and api software but you can't modify the packaged program to call the api modules because they don't give you the source code.

In other words you can run their program or write your own but you can't modify theirs. If you have their source then you have all of the examples you need in the source itself.

Al_The_Man
02-14-2005, 09:31 PM
Thanks JR & Kdoney, this and what I have gleaned from other sources has prepared me for the questions I need to ask the originators of the s/w. I just did not want to go in completely blind, as my VB programming is a bit rusty, but when I took it I had not heard of API.
Thanks
Al