CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > OpenSource CNC Design Center > Coding


Coding Post your Coding for opensource projects here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-15-2006, 07:50 PM
mikkojay's Avatar
Gold Member
 
Join Date: Mar 2006
Location: USA
Age: 41
Posts: 100
mikkojay is on a distinguished road
Old C++ Library to talk to ISA Card

I wasn't sure on which forum to list this in, but here is what I am trying to do:

I have a complete Techno-Isel cnc router.
It has:
- ISA card in the PC
- MS Dos program to talk to the ISA card
- Servo controller that is sent commands from the ISA card
- The table & servos itself

Everything works fine, but I ran into a snag when I tried to use the OLD MS Dos program interface (called SAC) to load a "large" input file. It gives a "not enough memory" error and pukes. That means I cannot load anything that has any high level of detail.

New software will not work with the old ISA card.
The only glimmer of hope I have is to use a Borland header file and .LIB file that I got my hands on.
The next problem is that this .LIB file seems to be 16 bit, and when I try to use my oldest C compiler (borland C builder 4), my linker pukes, complaining with this specific error:
[Linker Fatal Error] Fatal: Unsupported 16-bit segment(s) in module SRV400.

The new PCI card (to run modern software) is $1600.00. OUCH!!!
So you see why I was entertaining the idea of trying to whip up a quick program. I also just want to see if it is at all possible.

I am just getting into C++, so most of the details are over my head when it comes to linking etc...
If anyone has an opinion, let me know. I would be happy to email the 2 files I have if anyone wants to check them out.

-note I just tried uploading a pic, and it gave me an odd error I have never seen before. I can try that again later.
Thanks, Mike
__________________
Expensive tools can be cheaper than professional therapy

Last edited by mikkojay; 07-15-2006 at 07:58 PM. Reason: add pic
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 07-16-2006, 09:21 AM
 
Join Date: Nov 2004
Location: USA
Posts: 8
DaveP is on a distinguished road

Just a thought - get on one of the Linux sites and see if your C++ can
be compiled by gcc - If it does not require much modification you Win.
Plus you can run some DOS stuff in Linux - With WINE you can even run
some winders stuff.
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 07-17-2006, 08:59 AM
 
Join Date: May 2006
Location: USA
Posts: 1
pgheit01 is on a distinguished road
C/C++ library

Take a look at the Watcom compiler. It can still build DOS or Windows programs. 16 or 32 bit. And it's free.

http://www.openwatcom.org/index.php/Main_Page
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 07-17-2006, 01:25 PM
 
Join Date: Nov 2005
Location: uk
Posts: 1
mintoe is on a distinguished road

Which version of dos are you using?
dos can only ''see'' 640k of memory
version 6 - 6.2 etc has a feature called memmaker which can load
things like mouse drivers keyboard etc into high memory ,which should
allow your program to run, try typing memmaker at the c: prompt

Hope this helps...........mintoe
Tweet this Post!Share on Facebook
Reply With Quote

  #5  
Old 07-17-2006, 05:10 PM
mikkojay's Avatar
Gold Member
 
Join Date: Mar 2006
Location: USA
Age: 41
Posts: 100
mikkojay is on a distinguished road

Hey thanks for the replies-
I ordered a copy of Borland Turbo C 4.5 off ebay since it was pretty cheap. The free version 2 that is available for free download is giving me linker errors that have me pulling what's left of my hair out! I will also try the other free compiler. The input file size that is puking the DOS program seems to be around 100kb. The program (I think) is probably trying to read the whole input file into memory, then parse it apart/cycle line by line. That's just a guess. It could also just be puking because it is poorly written and has a bunch of recursion or something like that. Oh well, I will never know- all I can do is try to get a linker to be happy about the functions in the LIB file I was given. I'll keep ya posted. This is a pain, but I am learning a bunch of stuff so its ok for now.
-Mike
__________________
Expensive tools can be cheaper than professional therapy
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6  
Old 07-17-2006, 09:17 PM
mikkojay's Avatar
Gold Member
 
Join Date: Mar 2006
Location: USA
Age: 41
Posts: 100
mikkojay is on a distinguished road

I downloaded the WATCOM compiler, and then tried adding a reference to my .h file to the primary .c file in one of the win16 sample programs. I then added a reference to the .LIB file.
That compiled ok, but then I added a call to one of the functions in the LIB and (insert sound of breaking glass) I got this linker error:
Error! E2028: amp_enable_ is an undefined reference
file WATZEE.obj(C:\WATCOM\samples\win\watzee\WATZEE.C): undefined symbol amp_enable_

Here is an interesting note from the linker help:
By default, the Open Watcom C and C++ compilers append an underscore ('_') to all function names.

This is the definition in the .h file:
void amp_enable();

It seems like the appended underscores are causing problems-
I will mess with it a little bit, but I may have to wait for the right version of the Borland compiler to show up on my doorstep.

Also, I admit that I know next to nothing about linkers or C++ for that matter, so if I am doing something dumb, please call me on it!

Thanks, Mike
__________________
Expensive tools can be cheaper than professional therapy
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 07-18-2006, 03:56 PM
 
Join Date: Apr 2006
Location: US
Posts: 50
ajmoir is on a distinguished road
ISA Card

I'd probably ignore the DOS software etc. It's probably very crufty.

Which make/model is the ISA card? My approach would be to try and interface to the card under a modern OS e.g. Linux. Then interface to the driver with modern software.

My hunch is that the card is pretty generic and you could probably upgrade to a modern card pretty easily. The cables to the steppers must be pretty generic.
Tweet this Post!Share on Facebook
Reply With Quote

  #8  
Old 07-19-2006, 12:18 AM
mikkojay's Avatar
Gold Member
 
Join Date: Mar 2006
Location: USA
Age: 41
Posts: 100
mikkojay is on a distinguished road

Well, here is where I sit today:
The Borland Turbo C++ v4.5 for Windows compiler (that I appear to have wasted 29 bux on) will not compile/link the proprietary servo LIB file. It is a techno-isel SRV400 card by the way...
The problem is that the compiler I tried is the WINDOWS edition and not the DOS version. After a little more suffering/research, I realized this.
The LIB file that I am trying to link has references to functions that the Windows compiler "does not allow" whatever that means, I don't know, that's just what I read in a thread where some poor sucker had the exact same problem I did.

The good news is that I found a used Sam's C++ book that includes the 3.1 version of the Borland compiler that was actually used to create the LIB file I am trying to access. The book was only $13 on Amazon, so I thought I would give it one last shot. If that doesn't work, I might just freak the hell out!
Nah, its cool- I am demystifying this stuff little by little.
I actually have the PDF that describes the memory register bit mappings, so if I wanted to get ridiculous, maybe I will go that deep.

I have snooped around looking at other card alternatives, in the case I give this one the boot- so far the cheapest PCI card has been about $640.00 for a 3 axis. (as opposed to the $1600 those guys at techno isel want). The $640 card also comes with tons of sample code, documentation etc... so it has me thinking. Anybody seen one cheaper than that???
Here it is---> http://bwi.com/prod/6772

It sucks that this setup was bought only about 10 years ago and is now so obsolete I can't stand it. I guess it still "works", but then again so does the beta VCR if you want to get technical.

-Mike
__________________
Expensive tools can be cheaper than professional therapy

Last edited by mikkojay; 07-19-2006 at 12:20 AM. Reason: typo fix
Tweet this Post!Share on Facebook
Reply With Quote

  #9  
Old 07-19-2006, 01:16 AM
mikkojay's Avatar
Gold Member
 
Join Date: Mar 2006
Location: USA
Age: 41
Posts: 100
mikkojay is on a distinguished road

I just had to add this-
This company is the manufacturer of the $640 card mentioned above.
If you have some time to kill, download the source code for some of their cards.
Now that is what I am talking about!
http://www.icpdas.com/products/motio...ntrol_list.htm
This company gives away awesome info/code/source

-Mike
__________________
Expensive tools can be cheaper than professional therapy

Last edited by mikkojay; 07-20-2006 at 11:11 PM. Reason: clean up
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 07-24-2006, 03:12 PM
 
Join Date: Jul 2006
Location: Srilaka
Posts: 1
kai-cnc is on a distinguished road

Is this a stepper or servo system thatyou a re talking about.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11  
Old 07-26-2006, 08:00 AM
mikkojay's Avatar
Gold Member
 
Join Date: Mar 2006
Location: USA
Age: 41
Posts: 100
mikkojay is on a distinguished road

Hey Kai,
Thanks for the email- it inspired me to give it one last shot and I got it going!
This forum has once again proved that it is worth its weight in gold, even more- since I don't think data actually weighs anything
-Mike
__________________
Expensive tools can be cheaper than professional therapy
Tweet this Post!Share on Facebook
Reply With Quote

  #12   Ban this user!
Old 07-27-2006, 08:16 AM
 
Join Date: Dec 2005
Location: USA
Posts: 3,319
NC Cams is on a distinguished road

"What did you do to get it going????" as I sit here in memerized silence.

Sort of like watching a soap opera and not catching the eppisode that explains what REALLY happened at the cliff-hanger ending....
Tweet this Post!Share on Facebook
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 12:00 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353