CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sun May 28, 2017 9:39 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Nov 25, 2016 3:59 pm 
Offline

Joined: Fri Aug 07, 2015 9:59 pm
Posts: 57
Hallo Everyone

I have been trying to script my documentation and get a pdf output for the same.
using Sphix and rst2pdf. The try the command

>sphinx-build -b pdf C:\Project\SysFile\Source C:\Project\SysFile\Build

and i get errors

libraries [ERROR] pdfbuilder.py:130 too many values to unpack
..
ValueError: too many values to unpack
FAILED
build succeeded.

has anyone been successful using this..!!

I am using Codesys V3.6.
Thanks and warm regards


Top
   
PostPosted: Fri Nov 25, 2016 4:38 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 192
Hi learnetk.

From the subject I think you want to generate documentation for a library but from the text I get the impression you want to generate documentation for your scripts. Which is the correct one?

If you want to generate documentation for a library did you use CODESYS Libdoc? See "Library Development Summary" and "Script your Documentation" in the online help.

BR
Martin

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Mon Nov 28, 2016 10:22 am 
Offline

Joined: Fri Aug 07, 2015 9:59 pm
Posts: 57
Hi Martin,

I am using Codesys V3.5 SP6 Patch 3

Firstly, i installed Python 2.7.12 along with the packages Sphinx and rst2pdf.

Then started with the Libdoc scripts (as in Script your Documentation) and followed the steps as under :

Step 1 : Libdoc export c:\project\lib\sysfile.library c:\project\lib\sysfile.json
Step 2 : Libdoc generate c:\project\lib\sysfile.json c:\project\lib\Frame
Step 3 : Libdoc merge c:\project\lib\sysfile.json c:\project\lib\Frame c:\project\lib\Source

Step 4 : copy the files 'conf.py' to the Source folder, remove the html part and reference to libdoc_builder
Step 5 : Add in Conf.py the following changes
extensions = ['sphinx.ext.todo', 'rst2pdf.pdfbuilder']
pdf_documents = [('index', u'rst2pdf', u'SysFileDoc', u'Test'),]

Step 6 : sphinx-build -b pdf c:\project\lib\source c:\project\lib\build

>sphinx-build -b pdf c:\project\lib\source c:\project\lib\build
Running Sphinx v1.4.9
loading pickled environment... failed: source directory has changed
building [mo]: targets for 0 po files that are out of date
building [pdf]: targets for 27 source files that are out of date
updating environment: 27 added, 0 changed, 0 removed
reading sources... [100%] libraries
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
processing rst2pdf... index ACCESS_MODE SYS_FILETIME SYS_FILE_STATUS SysFileClose SysFileCopy SysFileDelete SysFileDeleteByHandle SysFileEOF SysFileFlush SysFileGetName SysFileGetName2 SysFileGetPath
SysFileGetPos SysFileGetSize SysFileGetSizeByHandle SysFileGetStatus SysFileGetStatus2 SysFileGetTime SysFileOpen SysFileRead SysFileRename SysFileSetPos SysFileTruncate SysFileWrite info libraries [E
RROR] pdfbuilder.py:130 too many values to unpack
Traceback (most recent call last):
File "c:\python27\lib\site-packages\rst2pdf\pdfbuilder.py", line 122, in write
appendices=opts.get('pdf_appendices', self.config.pdf_appendices) or [])
File "c:\python27\lib\site-packages\rst2pdf\pdfbuilder.py", line 209, in assemble_doctree
index_nodes=genindex_nodes(genindex)
File "c:\python27\lib\site-packages\rst2pdf\pdfbuilder.py", line 385, in genindex_nodes
for entryname, (links, subitems) in entries:
ValueError: too many values to unpack
FAILED
build succeeded.

Thanks and warm regards


Top
   
PostPosted: Mon Nov 28, 2016 3:00 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 192
Hi learnetk.

Why didn't you use our tool to generate the PDF? For that you have to transform the source to LaTeX which can be converted to PDF. See "PDF Output Format" in the online help.

Maybe you should use a newer version of CODESYS to create your documentation because there were some bugs in the early versions of the tool.

BR
Martin

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Mon Nov 28, 2016 6:06 pm 
Offline

Joined: Fri Aug 07, 2015 9:59 pm
Posts: 57
Hi Martin,
Thank you ..!!
That works, as described in the section "PDF Output Format". But how could i add multiple .tex files to make a single document.

Thanks and warm regards.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited