Author Topic: Custom software for RV1S/RV4S  (Read 15366 times)

Jason

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Custom software for RV1S/RV4S
« Reply #30 on: August 24, 2015, 09:52:27 PM »
When you click on the user controls for the machine to move by 1 to the right, the data sequence looks like this:

yeah, remember that moving involves moving both cylindrical axis motors AND
rotating the head to maintain orientation of the part.
I suspect that each base address corresponds to one DSP.
302 being the X, 300 and 301 being Y and rotate (both with no movement in your test, so
no way to tell yet) and 303 being the Z which you never tested.

The commands are going to be speed, direction and number of steps. I think I did start
disassembling the calling functions which made it fairly clear but it was a while ago and I
just moved on.

With your hooking, I won't bother trying to capture any more, I'll concentrate on the
interfacing.
Do you have a way of generating compatible .dll functions? I assumed that GCC or
M$ C++ wouldn't be decorate the C++ the same as the Borland stuff.


Mike

  • Administrator
  • Sr. Member
  • *****
  • Posts: 489
    • View Profile
Re: Custom software for RV1S/RV4S
« Reply #31 on: August 24, 2015, 11:34:47 PM »
Can't say I've looked close enough to notice, but does it actually make any attempt to keep the theta axis square when moving ? I can't see any reason to do this -  all it needs to know is the delta between the start and end position (and ideally should get to the latter by the time it's at the end position, but without moving so fast the part slips).

If it is as simple as steps/direction/speed to each DSP, I wonder if instead of interfacing to the ISA card, it might be almost as easy to ditch the DSP card completely and just feed the trapped calls via USB into an MCU or small FPGA.
One nice thing about pick & place versus CNC is it's basically moving from one place to an other, and you don't really care about accurate speeds or co-ordination between axes.


 
 


  

arvydas

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Custom software for RV1S/RV4S
« Reply #32 on: August 25, 2015, 11:57:57 AM »
I've been using IDA Pro and custom script I wrote to get the information without hooking as this was the fastest method. Seems that 303 is rotation address.

Attached debug log when rotating by 900. All numbers in hex.

OUT 303, 80
OUT 303, 40
OUT 303, 0
OUT 303, 20
OUT 303, 10
OUT 303, 0
OUT 303, 8a
OUT 303, 40
OUT 303, 0
OUT 303, 20
OUT 303, 10
OUT 303, 0
OUT 303, 84
OUT 303, 40
OUT 303, 0
OUT 303, 81
OUT 303, 4f
OUT 303, 0
OUT 303, 84
OUT 303, 40
OUT 303, 0
OUT 303, 89
OUT 303, 47
OUT 303, 0
OUT 303, 82
OUT 303, 40
OUT 303, 0
OUT 303, 83
OUT 303, 4d
OUT 303, 0
OUT 303, 84
OUT 303, 40
OUT 303, 0
OUT 303, 8a
OUT 303, 40
OUT 303, 0
OUT 303, 84
OUT 303, 46
OUT 303, 0
OUT 303, 80
OUT 303, 40
OUT 303, 0
OUT 303, 20
OUT 303, 10
OUT 303, 0
OUT 303, 81
OUT 303, 44
OUT 303, 0

IDA Pro is capable to generate readable reverse engineered pseudo code for all functions.

I've hit a road block with generating a proxy DLL. Win98 does not want to load rvplace.exe and it complains that it can't find the exported functions even though dumpbin shows them correctly. The proxy DLL loads just fine with rvplace.exe on Win XP and up. Tried to compile the DLL with VC6 and MSVS2005 on Win98, XP and 7, but I end up getting the same error message.

I'm using genwrapper which you can find here: https://github.com/floodyberry/genwrapper and you can find more details about the implementation here: https://floodyberry.wordpress.com/2008/09/08/generating-dll-wrappers/

However, it generates incorrect def file that needs fixing in order to compile. LMK if any of you would be interested to have a look at the implementation and I'll upload the source code I currently have. My first step was to generate a basic DLL that forwards all functions and gets loaded by rvplace.

My next step to solve this is to inject a DLL in to rvplace.exe process and hook functions dynamically. This way I should be able to hook any function within rvplace.exe and any library it loads without the need to create a proxy DLL. This is somewhat a challenge as hooking functions in Win 98 is very different than hooking on NT based Win version with CreateRemoteThread, however I'm sure I will be able to solve it. Just need to get the basic Hello World thing going with injector and injectable DLL :-)


Mike

  • Administrator
  • Sr. Member
  • *****
  • Posts: 489
    • View Profile
Re: Custom software for RV1S/RV4S
« Reply #33 on: August 25, 2015, 12:13:35 PM »
That looks like it's shifting nibbles of data at a time . If you read the right-hand digits vertically they are always in pairs.
Top 4 bits are probably commands, with the bottom 4 as parameters : 
Bit 7 :  write MSnibble
Bit 6  : write LSnibble




WillReeve

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Custom software for RV1S/RV4S
« Reply #34 on: November 07, 2015, 12:05:44 PM »
I wonder if something from these guys would fit the bill:

http://www.planet-cnc.com/index.php?page=home

should interface straight into the stepper drivers?

Jason

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Custom software for RV1S/RV4S
« Reply #35 on: May 03, 2016, 09:35:11 PM »
Phonoplug, did you manage to contact the software guy?

sarason

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Custom software for RV1S/RV4S
« Reply #36 on: June 07, 2017, 03:40:00 PM »
Hows this negotiation working out ?

sarason

alanambrose

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Custom software for RV1S/RV4S
« Reply #37 on: December 07, 2017, 04:24:28 PM »
>>> That looks like it's shifting nibbles of data at a time

Ah v good, I just twigged yesterday that the card is an 8-bit ISA card - so that makes sense. Also, I just noticed this:

http://anagram.net/nuts/Versatronics/Contents%20of%20ramp%20dot%20sys.png

Alan