Git Product home page Git Product logo

vscode-tpp-extension's Introduction

Fanuc TP-Plus Language Syntax Highlighter

This is a syntax highlighter for the TP+ abstraction language for Fanuc robot controllers written by onerobotics.

Features

..warning:: As of v0.1.4 syntax highlighter will import the ruby syntax highlighter. You may have to download the Ruby vscode extension for this to work.

color theme

A special color theme was created for viewing TP+ files called tpp-vs-dark.

extension commands


  • Interpret TPP
    • invokes "tpp file.tpp -o file.ls" in intregrated terminal
  • Interpret TPP with environment
    • same as 'Interpret TPP' but requires an environment variable file (i.e. "tpp file.tpp -o file.ls -e env.tpp"). This varible file is declared in a package.json file in the same directory as the .tpp file being interpreted.
  • Send LS files to robot
    • sends all .ls files in the subdirectory ./ls to the robots ftp address defined in package.json.
  • Send current LS file to robot
    • sends .ls file of the tpp file currently active to the robots ftp address defined in package.json.

In order to use the extension commands a package.json file should be created in the same directory as the .tpp files you are translating into .ls files. The package.json file should be formatted like the following:

{
    "project" : "Test-project",
    "description" : "Test project for vscode extension",
    "version" : "0.0.1",
    "license" : "MIT",
    "author" : "kobbled",
    "environment" : "./vars.tpp",
    "ftp"    : "127.0.0.1",
    "karel" : {"name" : "hash_filename", "clear" : false, "config" : "rossum_config_filename"},
    "includes" : ["../frames", "../poses"],
    "macros" : ["DEBUG=true", "LOG=false"]
}

The extension relies on the keys "environment", and "ftp" to be properly set in order to use all of the commands.

If your TP+ uses import statements if the file being imported is not in the working directory of the pacakge.json file, the folder which it resides must be specified in the pacakge.json with an "includes" key.

The file structure of the tpp files, the package.json file, variable files, and their translated .ls files should be as follows:

P1_data/
├── package.json
├── vars.tpp
├── file1.tpp
├── file2.tpp
└──  ls/
    ├── file1.ls
    └── file2.ls
    └── ftpcmds.txt

Requirements

  • This package depends on on The TP+ abstraction language which can be downloaded at: https://github.com/kobbled/tp_plus

  • Make sure that the gem installs correctly, the ruby bin is in your PATH variables, and 'tpp' can be invoked from the terminal. Extension commands will use the integrated terminal in vscode and use the 'tpp' command.

  • vscode > 1.33.0

  • TP+ and this extension were only test on a windows machine. While it is possible to run TP+ on linux or mac, it is not recommended as Fanuc software is only available for windows.

known issues

vscode-tpp-extension's People

Contributors

kobbled avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.