Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Project Status

This repository is no longer maintained. For continued updates, please see https://github.com/kobbled/tp_plus.

TP+

Build Status

TP+ is a higher-level language abstraction that translates into FANUC TP. It features many useful utilities that makes creating TP programs easier:

  • Identifiers for registers, position registers, IO, etc.
  • Re-usable methods
  • If-else blocks
  • Readable motion statements
  • Automatic label numbering

Of course adding another layer of abstraction takes you a step further away from the code the robot is running. However, it's hoped that the increased productivity and rigid syntax requirements will actually improve your TP code.

Examples

example_1.tpp

foo  := R[1]
bar  := DO[1]
baz  := DO[2]

home := PR[1]
lpos := PR[2]

foo = 1

@loop
  foo += 1

  jump_to @loop if foo < 10

turn_on bar if foo == 5
toggle baz

linear_move.to(home).at(2000, 'mm/s').term(0)
get_linear_position(lpos)

example_1.ls

/PROG example_1
/MN
 : R[1:foo] = 1 ;
 :  ;
 : LBL[100:loop] ;
 : R[1:foo]=R[1:foo]+1 ;
 : IF R[1:foo]<10,JMP LBL[100] ;
 :  ;
 : IF (R[1:foo]=5),DO[1:bar]=(ON) ;
 : DO[2:baz]=(!DO[2:baz]) ;
 :  ;
 : L PR[1:home] 2000mm/sec CNT0 ;
 : PR[2:lpos]=LPOS ;
/END

For a more extensive example and test environment, visit http://tp-plus.herokuapp.com/.

Usage

  1. gem install tp_plus
  2. tpp filename.tpp -o filename.ls

See tpp --help for options.

Development

  1. Install Ruby
  2. Install git
  3. Install bundler gem install bundler
  4. Clone the repo git clone https://github.com/onerobotics/tp_plus.git
  5. Install dependencies with bundle
  6. Build the parser and run the tests with rake

License

TP+ is released under the MIT License.

About

FANUC TP abstraction

Resources

Releases

No releases published

Packages

No packages published