rawbytes
dfolker
✭
Hi.
I'm currently working on some Rapid code that sends and receives commands using sockets. Currently I'm using strings for the actual data and because of this I'm limited to 80 characters. The strings that I send and receive are usually in the form of robtargets, pose's and such and I'm currently using StrToVal and ValToStr to do the conversion from/to the actual data types.
My problem is that the system I'm currently working on will require me to use a record that will contain a lot of components and because of this the generated string will be bigger than 80 characters. I have therefore looked at the type rawbytes to avoid the size limitation. The problem with this is that I wont be able to use StrToVal and ValToStr anymore.
I guess I could start writing a parser for the data that I will use but I was kind of hoping that there would be a better way to do it so I wont have to write a new parser every time I'm told to add a new record to the system. (RawBytesToVal and ValToRawBytes functions would have been so nice...)
Is there, or would it be possible to write, functions to convert between value types and rawbytes?
dfolker2012-03-02 18:22:54
0
Comments
-
>>Is there functions to convert between value types and rawbytes?
Not to my knowledge.But, depending on who is sending and who is receiving, wouldn't it be simpler to divide up the record in multiple 80char strings and then recombine them at the receiver for a StrToVal conversion?I haven't tried it myself but have seen such a solution at an ABB partner.John
Developer Center0 -
Hi John.
Sorry for not answering until now, but last week was a busy week to say the least. I actually ended up writing a small parser in RAPID to parse my rawbyte messages. The reason why I didn't split up my data into several messages is that the application the robot is communicating with is not exclusivly for ABB robots. So rather than handling the problem on the PC side and possibly creating more problems with other hardware I decided that the parser was the best way to go.
A RawbyteToVal() would have been nice though
0 -
[QUOTE=dfolker]A RawbyteToVal() would have been nice though
[/QUOTE]
Agreed.If you want I could put it in as a feature suggestion, but if so you'd have to PM me with your company's details. Customer requests always goes before internal requests.John
Developer Center0 -
Is there anything like RawbyteToVal() now 10 years later?Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up0 -
A ValToRawbytes() would be nice as well 👍Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up0
Categories
- All Categories
- 5.5K RobotStudio
- 393 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 783 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings