FanucPostProcessor class.
More...
#include <post_processor.hpp>
|
void | appendCall (const std::string program_name) |
|
void | appendComment (const std::string comment) |
|
void | appendCustomCommand (const std::string command) |
|
void | appendDataMonitorStart (const unsigned id) |
|
void | appendDataMonitorStop () |
|
void | appendDigitalOutput (const unsigned digital_out_id, const bool state) |
|
void | appendDigitalOutput (const unsigned digital_out_id, const double pulse_time) |
|
void | appendEmptyLine () |
|
void | appendEndFor () |
|
void | appendFor (const unsigned reg_id, const std::string start, const std::string stop) |
|
void | appendFor (const unsigned reg_id, const unsigned start, const unsigned stop) |
|
void | appendGroupOutput (const unsigned id, const unsigned value) |
|
void | appendJumpLabel (const unsigned id) |
|
void | appendLabel (const unsigned id) |
|
void | appendPose (FanucPose &pose) |
|
void | appendPoseId (FanucPose &pose) |
|
void | appendRun (const std::string program_name) |
|
void | appendSetRegister (const unsigned r_id, const double value) |
|
void | appendUFrame (const unsigned uf_id) |
|
void | appendUTool (const unsigned ut_id) |
|
void | appendWait (const double time) |
|
void | appendWait (const unsigned digital_in_id, bool state) |
|
void | clearProgram () |
|
| FanucPostProcessor () |
| Default Constructor. More...
|
|
unsigned | generatePrograms (std::vector< std::pair< ProgramName, Program >> &output_programs, const unsigned lines_per_program=0) |
|
bool | getPoseFromId (const unsigned pose_id, FanucPose &pose) |
|
void | setApplicative (const std::string appl) |
|
void | setMemorySize (const unsigned size) |
|
void | setPermissions (const FanucPostProcessor::Permissions perms) |
|
void | setProgramComment (const std::string comment) |
|
void | setProgramName (std::string name) |
|
void | uploadToFtp (const std::vector< std::pair< ProgramName, Program >> programs, const std::string ip_address, const std::string port_number="21", const std::string username="", const std::string password="") |
|
void | useLineNumbers (bool line_numbers) |
|
| ~FanucPostProcessor () |
|
Writes the program content into a string.
- Parameters
-
[out] | output_programs | this vector of pairs (program name, program) contains the programs |
[in] | lines_per_program | the maximum number of lines in a program |
- Returns
- The number of programs generated, zero meaning error Multiple programs are generated depending on the lines_per_program limit, if set to 0 only one program will be generated
Definition at line 61 of file post_processor.hpp.
Enumerator |
---|
MM_SEC |
|
CM_SEC |
|
M_SEC |
|
MM_MIN |
|
CM_MIN |
|
M_MIN |
|
PERCENTAGE |
|
Definition at line 36 of file post_processor.hpp.
fanuc_post_processor::FanucPostProcessor::FanucPostProcessor |
( |
| ) |
|
fanuc_post_processor::FanucPostProcessor::~FanucPostProcessor |
( |
| ) |
|
void fanuc_post_processor::FanucPostProcessor::appendCall |
( |
const std::string |
program_name | ) |
|
Call a program
- Parameters
-
- Warning
- Transferring the program on the robot may fail if the program specified does not exist
Definition at line 425 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendComment |
( |
const std::string |
comment | ) |
|
Add a comment in the program, starting with an exclamation point
- Parameters
-
Definition at line 317 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendCustomCommand |
( |
const std::string |
command | ) |
|
Append a custom command, the line numbers and end semicolon are automatically added
Definition at line 505 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendDataMonitorStart |
( |
const unsigned |
id | ) |
|
void fanuc_post_processor::FanucPostProcessor::appendDataMonitorStop |
( |
| ) |
|
void fanuc_post_processor::FanucPostProcessor::appendDigitalOutput |
( |
const unsigned |
digital_out_id, |
|
|
const bool |
state |
|
) |
| |
Set a digital output value to either TRUE or FALSE
- Parameters
-
[in] | digital_out_id | |
[in] | state | |
Definition at line 329 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendDigitalOutput |
( |
const unsigned |
digital_out_id, |
|
|
const double |
pulse_time |
|
) |
| |
Set a digital output pulse time
- Parameters
-
[in] | digital_out_id | |
[in] | pulse_time | |
- Note
- The pulse time is in seconds
Definition at line 338 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendEmptyLine |
( |
| ) |
|
void fanuc_post_processor::FanucPostProcessor::appendEndFor |
( |
| ) |
|
Stop a for loop, fails if no for loop was opened
- Note
- Does NOT work if multiple programs are generated
Definition at line 495 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendFor |
( |
const unsigned |
reg_id, |
|
|
const std::string |
start, |
|
|
const std::string |
stop |
|
) |
| |
Append a for loop, start and stop condition must be valid strings
- Parameters
-
reg_id | register to store the loop increment |
start | value |
stop | value |
- Note
- Does NOT work if multiple programs are generated
Definition at line 475 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendFor |
( |
const unsigned |
reg_id, |
|
|
const unsigned |
start, |
|
|
const unsigned |
stop |
|
) |
| |
For loop in an integer range, eg: FOR R[1]=1 TO 8;
- Parameters
-
reg_id | register to store the loop increment |
start | value |
stop | value |
- Note
- Does NOT work if multiple programs are generated
Definition at line 485 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendGroupOutput |
( |
const unsigned |
id, |
|
|
const unsigned |
value |
|
) |
| |
void fanuc_post_processor::FanucPostProcessor::appendJumpLabel |
( |
const unsigned |
id | ) |
|
Jump to an existing label, fails if the label doesn't exist
- Parameters
-
- Note
- Does NOT work if multiple programs are generated
Definition at line 454 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendLabel |
( |
const unsigned |
id | ) |
|
Add a label, each label ID can only be added once
- Parameters
-
- Note
- Does NOT work if multiple programs are generated
Definition at line 441 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendPose |
( |
FanucPose & |
pose | ) |
|
Add a Fanuc pose
- Parameters
-
- Note
- The pose_id_ member of the pose will be set by this function, first pose has ID == 1
Definition at line 274 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendPoseId |
( |
FanucPose & |
pose | ) |
|
Add a Fanuc pose by using an existing ID
- Parameters
-
[in] | pose | the pose_id_ field will be used to determine to which pose it refers |
- Returns
- True if successful, false otherwise
- Note
- Look at appendPose to know how ID are set
-
The groups_ field will be ignored and cleared
Definition at line 293 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendRun |
( |
const std::string |
program_name | ) |
|
Run a program
- Parameters
-
- Warning
- Transferring the program on the robot may fail if the program specified does not exist
Definition at line 433 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendSetRegister |
( |
const unsigned |
r_id, |
|
|
const double |
value |
|
) |
| |
void fanuc_post_processor::FanucPostProcessor::appendUFrame |
( |
const unsigned |
uf_id | ) |
|
Append a UserFrame instruction. From 0 to 9
- Parameters
-
Definition at line 379 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendUTool |
( |
const unsigned |
ut_id | ) |
|
void fanuc_post_processor::FanucPostProcessor::appendWait |
( |
const double |
time | ) |
|
Add a waiting time in the program
- Parameters
-
- Note
- The duration is in seconds
Definition at line 355 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::appendWait |
( |
const unsigned |
digital_in_id, |
|
|
bool |
state |
|
) |
| |
Wait for a Digital Input to be triggered
- Parameters
-
[in] | digital_in_id | |
[in] | state | |
Definition at line 369 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::clearProgram |
( |
| ) |
|
unsigned fanuc_post_processor::FanucPostProcessor::generatePrograms |
( |
std::vector< std::pair< ProgramName, Program >> & |
output_programs, |
|
|
const unsigned |
lines_per_program = 0 |
|
) |
| |
bool fanuc_post_processor::FanucPostProcessor::getPoseFromId |
( |
const unsigned |
pose_id, |
|
|
FanucPose & |
pose |
|
) |
| |
std::string fanuc_post_processor::FanucPostProcessor::permissionsToString |
( |
Permissions |
perm | ) |
|
|
inlineprivate |
void fanuc_post_processor::FanucPostProcessor::prependLineNumber |
( |
std::string & |
line, |
|
|
const unsigned |
number |
|
) |
| |
|
private |
void fanuc_post_processor::FanucPostProcessor::setApplicative |
( |
const std::string |
appl | ) |
|
Allows to specify an application for specific instructions (eg: ArcTool)
- Parameters
-
Definition at line 269 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::setMemorySize |
( |
const unsigned |
size | ) |
|
This is computed by the Fanuc ASCII upload compiled, it is not mandatory to set it
- Parameters
-
void fanuc_post_processor::FanucPostProcessor::setProgramComment |
( |
const std::string |
comment | ) |
|
Allows to set the program comment
- Parameters
-
- Returns
- True if successful, false otherwise
- Note
- The comment string maximum size is 16, characters after are truncated by the Fanuc converter
Definition at line 259 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::setProgramName |
( |
std::string |
name | ) |
|
Allows to set the program name in the header
- Parameters
-
[in] | name | without the file extension (.ls) |
- Returns
- True if successful, false otherwise
- Note
- The program name maximum length is 36 characters
Definition at line 246 of file post_processor.cpp.
bool fanuc_post_processor::FanucPostProcessor::tweakProgramName |
( |
ProgramName & |
name, |
|
|
const unsigned |
number |
|
) |
| |
|
private |
void fanuc_post_processor::FanucPostProcessor::uploadToFtp |
( |
const std::vector< std::pair< ProgramName, Program >> |
programs, |
|
|
const std::string |
ip_address, |
|
|
const std::string |
port_number = "21" , |
|
|
const std::string |
username = "" , |
|
|
const std::string |
password = "" |
|
) |
| |
Upload a LS/TP program to a Fanuc robot FTP
- Parameters
-
[in] | programs | contains the program names and content to be uploaded, |
[in] | ip_address | the IP address of the Fanuc FTP |
[in] | port_number | the port number of the FTP |
[in] | username | should be empty if anonymous login |
[in] | password | should be empty if anonymous login |
Definition at line 205 of file post_processor.cpp.
void fanuc_post_processor::FanucPostProcessor::useLineNumbers |
( |
bool |
line_numbers | ) |
|
std::string fanuc_post_processor::FanucPostProcessor::applicative_ |
|
private |
std::vector<std::shared_ptr<FanucCommand> > fanuc_post_processor::FanucPostProcessor::commands_ |
|
private |
unsigned fanuc_post_processor::FanucPostProcessor::for_count_ |
|
private |
std::vector<unsigned> fanuc_post_processor::FanucPostProcessor::labels_id_ |
|
private |
bool fanuc_post_processor::FanucPostProcessor::line_numbers_ |
|
private |
std::vector<FanucPose> fanuc_post_processor::FanucPostProcessor::poses_ |
|
private |
Vector containing the poses of our trajectory Not necessarily ordered!
Definition at line 341 of file post_processor.hpp.
std::string fanuc_post_processor::FanucPostProcessor::program_comment_ |
|
private |
std::string fanuc_post_processor::FanucPostProcessor::program_name_ |
|
private |
const unsigned fanuc_post_processor::FanucPostProcessor::program_name_max_size_ = 36 |
|
private |
The documentation for this class was generated from the following files: