Encoding on the FlexPendant
Hello all,
I was wondering what encoding that is used on the RAPID files on the controller?
I am sending RAPID modules from a pc to the flexpendant and load them into tasks. Since the flexpendant has support for swedish characters, in for example the routine names, our application should have the same. The problem is that I need to know the encoding, since I get errors when loading files that contains the special characters (???) into the flexpendant using the wrong encoding.
Best Regards
Mikael
Comments
-
I am confused, does your application run on the FlexPendant or a PC?If it runs on the FP, how are you getting files onto the FP from a PC?
What is the exact error message you are seeing? Can you load the module manually, i.e. using the Program Editor or RSOnline?
I don't see a problem when I load a module file that uses these special characters (that I created with WordPad) from the flashdisk, either as a comment, module name, or string literal. Also I can make these changes from RSOnline.
Russell Drown0 -
Hi,
I believe I was a bit short in my post. It is a PC application, using RAB to access the controller. I create a mod file using StreamWriter on the PC. Then I use PutFile in RAB to place the file on the controller.
The Problem I run into is when I write the file with the file on the PC with the writer, I have to alow the special character, since it is ABB standard. When I load the mod file into the controller, from my PC application using RAB and LoadModule(), it parses the file using another encoding then the one I used writing the file woth the stream writer. This gives that the (???) characters are replaced with some rubbish that the controller cannot handle. I get an error and the controller cannot run until the rapid is fixed.
I have only tried using special characters on routine names.
I hope that this post made more sense than my first one.
Best Regards
Mikael
0 -
Hi Mikael,
Yes your explanation clarified things for me. I assume that mod files, etc. must simply be ASCII (8-bit) because they can be edited by text editors.
I guess that you are trying to use ASCIIEncoding with Streamwriter, and have discovered that, for whatever reason, the ASCIIEncoding class in .Net Framework only supports 7-bit ASCII (chars 0-127).
As a result, according to the MSDN Help for ASCIIEncoding, it is probably placing the value 63 ("?") in place of your special characters. If this is the case, maybe you can track instances of characters above 127 and "post-process" your file to replace the instances of bytes = to 63 with the correct byte value.
Russell Drown0 -
[QUOTE=RussD]
I guess that you are trying to use ASCIIEncoding with Streamwriter, and have discovered that, for whatever reason, the ASCIIEncoding class in .Net Framework only supports 7-bit ASCII (chars 0-127).
[/QUOTE]
Hi,
I'm not sure there are any real ASCII standart that is more than 7-bit..
But anyhow, I got it to work using "Western European (Windows)" encoding. Code page: 1252. I guess that the RAB team used the standard encoding on their development machines.
Thank you Russ for your help!
Best Regards
Mikael
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings