Read Position Points from CSV File into Roboguide

  • I am a relatively new programmer and have little exposure and experience with Fanuc, robots, and roboguide as a whole. I am learning as much as a can about programming in roboguide but am struggling figuring out how to convert a CSV file in a .ls file for position points in a program. Basically, I want to take a CSV file wiht x,y,z coordiantes (tool point locations), convert that csv file into a roboguide useable .ls file, then import that .ls into roboguide and into a program so that my robot will have those position points for, lets say welding or dispensing around a part in those coordinate paths. If someone could please help me with this that would be awesome, or even just simply helping me convert the csv into a .ls would be a huge help.

    NOTE: I have never used, heard of, or programmed in KAREL. I would prefer a way to convert without using this method as I am completely unfamilar with it. If KAREL is the ONLY way to do this, then please provide an explanation for "getting started" with KAREL, i.e what and where to download it, setup, and exporting results into a .ls file.

    Thank you so much.

  • Place your Ad here!
  • Without Karel, I think you may have to do a bit of manual work behind getting things set up.

    Try the following to get an understanding of ASCII loading in Roboguide, and see if you could use something like this for your end goal:

    • In roboguide, create a simple program with a couple of points in it.
    • On the left hand side of your screen in the tree, under your robot programs; Right click the program you just created, and select "Save" -> "Text (.LS)"
    • Save the file to some location, such as your desktop
    • open the file in notepad (or some other text editor)
    • At the bottom of the program, you will see how point data is stored, try editing one of the points and save the file.
    • Back in Roboguide, in the top tool bar, select "Teach"-> "Load Program" -> and select the '.LS' file that you just edited.
    • Take a look at your TP program and note the changes.


    Perhaps some variation of this process could help you?

  • Thanks! But with 100 teach points, this method is EXTREMELY manual. I wish there was an easy way to just have those x,y,z coordinates from my excel file be put into roboguide touch points.

    Without Karel, I think you may have to do a bit of manual work behind getting things set up.

    Try the following to get an understanding of ASCII loading in Roboguide, and see if you could use something like this for your end goal:

    • In roboguide, create a simple program with a couple of points in it.
    • On the left hand side of your screen in the tree, under your robot programs; Right click the program you just created, and select "Save" -> "Text (.LS)"
    • Save the file to some location, such as your desktop
    • open the file in notepad (or some other text editor)
    • At the bottom of the program, you will see how point data is stored, try editing one of the points and save the file.
    • Back in Roboguide, in the top tool bar, select "Teach"-> "Load Program" -> and select the '.LS' file that you just edited.
    • Take a look at your TP program and note the changes.


    Perhaps some variation of this process could help you?

  • While you can do this in Karel, unless you need to do this on the fly on a real controller, I wouldn't recommend it. I just went through this, and it is not trivial.


    You can use Targets in roboguide to import points from a CSV file, and then generate a path from them, I find them pretty cumbersome to work with.


    EnergyAddict's route is the I typically take. My customers will usually provide me with a series of points they want to measure as an excel file, and I use Excel's vba engine to generate a .ls file I can then import into the robot.


    Here is a bit of VBA code to get you started:

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • This is amazing and did exactly what I was looking for. Thanks so much, incredible.

  • That is very nice of you to share. Is there a way to ensure that the file name input is not too long?

    You could add some checks to string the user passes in, but since I was the only guy using it, I didn't bother. Also on newer Fanucs, you are not limited to 8 characters anymore. I think the limit is something like 64 characters now.

    This is amazing and did exactly what I was looking for. Thanks so much, incredible.

    No prob. If we meet in the field, buy me a pop.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • I use Excel's vba engine to generate a .ls file I can then import into the robot.


    Here is a bit of VBA code to get you started:


    Nation, that's exactly the type of variation I was hinting at in my answer.

    Thanks for sharing that code, that is super useful, and far cleaner than my usual hobbled together VBA. I have a feeling I might reference that in some upcoming projects.

  • I'm also implementing this, a very useful tool thank you!


    But I'm running into a problem.. my VBA engine always writes my values with a "," as decimal separator instead of a "." as separator. I've changed all standard settings in my excel but it still writes a comma.. Roboguide then gives me a syntax errror.

    Any help will be very much appreciated!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners