0

Context

A friend of mine is having trouble printing source code to a human readable format.

The compiled (I assume) programs of their welding robot have the .rpg extension. They want to collect print-outs in human-readable format, possibly for backup or future reference.

Their supplier can provide the software that accomplishes this, be it at a considerable cost (and possibly: an annual license). Because of this, my friend decided to ask me if a easier/cheaper solution exists.

Examples & Pictures

The files can be read on the console of the robot, an example:

Picture of robot console.

I've done some minor research and I'm fairly sure this is the Report Program Generator (RPG) language developed by IBM. The Assembly-like syntax seems to match; it might be one of the later versions of the language.

My friend has send me an example .rpg file, the contents seem binary with some string literals scattered throughout. Screenshot of the contents of an example file in hexadecimal:

Screenshot of <code>.rpg</code> file contents.

The Question

There is not much, if any, clear information to be found online so I suppose I have multiple questions (for anyone that might know more about this):

  1. Is this (first image) Report Program Generator (RPG) code?
  2. Does the .rpg file contain compiled or processed code? Maybe an intermediate format?
  3. Is it possible to convert files as shown in the example, back to source-code or human-readable format, kind of 'disassemble' it?

If anyone knows more, don't hesitate to give me any information or ask more details if necessary. Thanks in advance!


And maybe not an important question but still something that bugs me (and might indicate I'm on the wrong track):

If this is indeed an RPG program, why would the compiled/processed binary have the .rpg extension, shouldn't the source-file have that? This leads me to believe I'm either (a) assuming the wrong things (the language, etc...) or (b) this is an intermediate format, easier for machines to read, that has to be interpreted by some kind of runtime system.

Maarten Bamelis
  • 2,243
  • 19
  • 32

3 Answers3

1

I don't think that's any version of IBM's RPG language. RPG does have a MOVEL opcode, but it doesn't have any of the others.

Also, all the versions of the IBM language have been intended for business programming. I doubt that it would have been used for robotics.

My guess is that's a proprietary language of the company that makes the robot.

Barbara Morris
  • 3,195
  • 8
  • 10
  • Indeed, I also noticed it was business programming language but thought that the later versions would have been broad enough to be used in different fields. Also, I assumed the other codes (e.g. `ARC-SET` and `ARC-ON`) to be some kind of function call. But I'm afraid you're right, it's probably a proprietary language. Thank you for your input. – Maarten Bamelis May 22 '15 at 09:41
1
  1. There are some similarities but it does not look like IBM RPG language.
  2. RPG sources are in fact source physical file members. They are not stored in the "traditional" file system but in OS/400 libraries. Therefore RPG sources have no extension. They can be converted to Integrated File System stream file though.
  3. I can't answer this question I'm afraid as it's unknown language to me.
Kociamber
  • 1,048
  • 8
  • 16
1

I expect possibly that the OP misidentifies the file type/extension; that the extension is actually .prg, and the files serve as instructions for a Panasonic Industrial Welding Robot. The following forum [drilled down to Panasonic Robots] bills itself as the biggest Industrial Robots Supportforum worldwide!; perhaps a good place to ask about those images provided in the OP, and the inquiry about getting source from what appears to be a binary instruction stream.

FWiW, the first image seems to show that the Ezed utility [on the console] gives that human-readable format, so then the question might be how to get that saved and then how to transfer that elsewhere; e.g. what type of comm ports and file transfer utilities are available from whatever platform/OS.

CRPence
  • 1,259
  • 7
  • 12