You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comments are indicated by starting the line with ' and have a maximum length of 33 characters.
The formatting does not allow umlaute like ö,ä,ü etc.
Python Tool
First, create a class JobFile that reads an existing job file from the file system.
The class should be called like this: job = JobFile(filename="examplefile.JBI")
The job file should be split into the header section and program section and the full code of each section should be stored (e.g. as individual lines).
After reading the file, the header section should be parsed and the different metadata should be stored as class properties.
For the program section, different rules should be discussed how the program structure should look like, what commands must be present or are not allowed, the order of specific commands etc. .
The individual rules will be listed and discussed in individual issues.
Example rules:
Every program should start with a comment line directly after the NOP statement
The program command SETREG MREG# should only be allowed when the job is listed unter FOLDERNAME TWINCAT_KOMMUNIKATION
learning goals
While developing the tool, the following Python skills should be practiced:
reading and working with files (using the with statement)
working with python classes (properties, methods etc.)
* Rule class is created, third rule is developing.
* #18 rule defined, #14 rule formatting completed, #20 rule defined, #22 rule class is defined, #17 documentation is started. Ruff check and black check completed.
* #15 new rule implemented.
* #19 implemented (CALL JOB:TRIGGER around ARCON/ARCOFF commands)
* Script is modified to work on a multiple file (#24) and pre-commit created (#23)
* Test folder with two JBI files is created.
* Working on GitHub Actions.
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Update githubaction.yml
* Set USERFRAME bug is corrected.
* Extra test files are added.
* check_E (#15) bug is corrected.
* check_B (#11) bug is corrected.
* check_D (#18) int bug argument is corrected.
* Not UTF-8 encoded file handling is added.
* Error Flag is implemented.
* No Foldername is accepted.
* Black applied.
* Some reformating.
* Some reformating.
* Apply suggestions from code review
Co-authored-by: Çağtay Fabry <cagtay.fabry@bam.de>
* Files folder is deleted.
* check_D bug solved.
* check_D bug solved.
* Review notes are implemented and updated.
* Comments are corrected. Segmentation of the classes and error handling improved.
---------
Co-authored-by: Çağtay Fabry <cagtay.fabry@bam.de>
YASKAWA JOB file parser
The goal is to create a Python utility that helps parsing YASKAWA JOB files written in the INFORM language.
structure of JOB file
A JOB file is a single text file made up of two parts:
The first line of a JOB file (the header section) starts with
The header section and the program section are separated by a single line containing the command:
basic syntax
header section
Different parts of the header section are indicated by
/
with various levels.Example:
program syntax
Commands in the program section are written in plain text.
In case of structures like for-loops, enclosed commands are indented by one tab
\t
Example:
Comments are indicated by starting the line with
'
and have a maximum length of 33 characters.The formatting does not allow umlaute like
ö,ä,ü
etc.Python Tool
First, create a class
JobFile
that reads an existing job file from the file system.The class should be called like this:
job = JobFile(filename="examplefile.JBI")
The job file should be split into the header section and program section and the full code of each section should be stored (e.g. as individual lines).
After reading the file, the header section should be parsed and the different metadata should be stored as class properties.
For the program section, different rules should be discussed how the program structure should look like, what commands must be present or are not allowed, the order of specific commands etc. .
The individual rules will be listed and discussed in individual issues.
Example rules:
learning goals
While developing the tool, the following Python skills should be practiced:
with
statement)Example file
The text was updated successfully, but these errors were encountered: