Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 07:18:50 PM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Industrial Robot Help and Discussion Center
| |-+  KUKA Robot Forum (Moderators: Werner Hampel, Martin H, SkyeFire)
| | |-+  fprintf
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: fprintf  (Read 326 times)
tyhu
Jr. Member
**
Offline Offline

Gender: Male
Posts: 91


« on: January 31, 2012, 12:07:42 AM »

In kuka, is there any API which could write data to an external file as fprintf in C?  Thanks.
Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1784



« Reply #1 on: January 31, 2012, 07:17:15 PM »

Not standard.  I know of some people who have written their own C# or VB6 plugins that run inside the Windows side of the controller and can monitor robot variables.  From there, writing those variables to a file would be fairly trivial.  But writing plugins that can engage the VxWinRTCC "hooks" in the KRC is, from what I've heard, rather tricky. 

One quick&dirty way to do this would be to use the serial ports in the robot and a null-modem cable.  A routine in KRL could send data strings out through the robot COM port, to be recieved and logged to file on the Windows side.  This could be as simple as runnin Hyperterminal on the Windows side with logging active, or a small Windows program or script that listens to the COM port and writes the received strings to disk is fairly straightforward, and requires no specialized KUKA knowledge.

Logged
mookie
Global Moderator
*****
Offline Offline

Gender: Male
Posts: 419



« Reply #2 on: February 01, 2012, 02:25:21 PM »

You can write to an external file and ive done it several times but I think one of the biggest issues that im running into is that I personally need to recompile for every different build of the robot. I can handle that though. I am working on something that may be useful here in the near future. is there a special way that you want your data output?
Logged
tyhu
Jr. Member
**
Offline Offline

Gender: Male
Posts: 91


« Reply #3 on: February 01, 2012, 08:15:34 PM »

Thanks, SkyeFire  and mookie.

I dont need special way for the output. I just hope that I can write date to an external .txt file. For example, I want to write robot location to an external .txt file every 10 seconds until, let's say, for 10 days.
Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1784



« Reply #4 on: February 01, 2012, 09:57:23 PM »

I've been complaining about KRL's lack of a write/read command for text files for years, but no one in Augsburg listens to me.   

So, ironically, your simplest path to performing such a function is to send the data out of the robot to a regular computer where you can easily set up a receiver system.  The serial ports are one way.  EKX would be another, if you have that package.  OPCserver might be capable of it, but I don't have any background in that, so I can't be sure.
Logged
tyhu
Jr. Member
**
Offline Offline

Gender: Male
Posts: 91


« Reply #5 on: February 01, 2012, 11:07:40 PM »

Right now, we can use OPC or serial port to realize logging data from another computer, but it is really inconvenient.
Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1784



« Reply #6 on: February 02, 2012, 01:26:36 AM »

Well, you can do it inside the robot, using the Windows side of the robot's brain.  But to the best of my knowledge, there is no way to do it directly from KRL.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!