Upload

ISaGRAF supports the uploading of the application stored in the target. The upload procedure communicates with the target to load the embedded zipped source code (EZS) and then restore the loaded project in the workbench environment.

Uploading a project

Communication settings

The project running on the connected target system can be uploaded if the target version is V3.22 or later, and if zipped source code have been embedded with the application. Embedding source code for upload is an optional feature. Please refer to the following topic for further information about how a project must be configured to enable upload:

Preparing project for upload

For a better understanding of Upload mechanism, please refer to the following topics:

How zipped source are stored in the target

Memory requirements on the target

About uploaded project

Compatibility issues


Uploading a project

The "Upload" dialog box is run from the "Files" command of the ISaGRAF Project Manager. Upload does not refer to an existing project on the Workbench. The currently selected project in project management list has no relationship with upload mechanism. To upload the application running on the target you must:

1- ensure that the target is properly connected

2- setup the communication parameters according to the connection link

3- press the "Run" button

Uploading embedded zipped source (EZS) and decompressing them may take few seconds. Messages in the dialog box will inform you when upload is complete, or in case of error.

The name used to create the ISaGRAF project is the one read in the target through communication. If this name is already used for an existing project in the workbench, you will be prompt to either overwrite it or select a unused name. You cannot cancel the registration of loaded sources as a project when upload is complete. The uploaded project is now ready and can be opened.


Possible errors

The following errors may occur when uploading a project. You are informed of the error in the "Upload" dialog box.

- communication cannot be established with the target

- connected target is an ISaGRAF system before version 3.22

- there is no application running in the target

- there is no EZS embedded in the target


Communication settings

Pressing the "Setup" button enables the user to define the parameters of the link used for communication for upload between ISaGRAF workbench and the target ISaGRAF system. You have to ensure that the configured parameters match to the connected target before running upload.

Select communication port

Serial link setup

Ethernet link setup


Select communication port

The "Communication port" identifies the hardware media between ISaGRAF workbench and target. It can be either the name of a serial port, or "Ethernet", reserved TCP-IP communication using the "Winsock" Version 1.1.

The "Slave number" identifies the target ISaGRAF system or task. It can be from 1 to 255. Refer to the target supplier manual for the slave number of the target system used.

The "Time out" is the time left to the target system for its communication operations between the end of a debugger question and the beginning of its response. This time is set as a number in seconds. The "Retries" field is the number of automatic trials the debugger executes for a communication operation before detecting a communication error.


Serial link setup

When a serial port (COM1..4) is selected, the "Setup" button is used to access to other serial link communication parameters. The transmission baud rate, parity and format may be selected.

When the "hardware" choice is selected for "Flow Control", the ISaGRAF Workbench controls the CTS and DSR lines to enable hardware handshaking during exchanges.


Ethernet link setup

When "Ethernet" is selected as a communication port, the "Setup" button is used to enter the "Internet Address" and "Internet port" number, for TCP-IP communication. These fields use the standard formats defined by the Socket interface.

The Workbench uses the WINSOCK.DLL Version 1.1 library for TCP-IP communications. This file must be correctly installed on the hard disk. "1100" is the default port number used if not specified when running the ISaGRAF target.


How zipped source are stored in the target

Embedded zipped source (EZS) is stored in generated code with resources. The generated resource is called "EZS". If source code embedding is selected, you cannot choose this name for another resource. Embedding source code does not imply any limitation in resource definition. The user written resource definition file is not affected by source embedding.

Please refer to the ISaGRAF documentation about the Code Generator for further details and information about resources.


Memory requirements on the target

Embedded zipped source (EZS) code requires extra memory to be stored with application code in the target. A general rough estimation is that minimum EZS (no extra option selected for source embedding) has one and a half the size of the executable code. This means that the embedding of EZS will multiply the size of downloaded code by 2.5.

Special limitation may appear on some target system based on segmented memory. As EZS are stored as resources in generated code, they must be stored in the same data segment as the application code.


About uploaded project

The uploaded project contains all the files and data required for re-compiling. Depending on the options selected during its previous compiling, it may also contain auxiliary files such as project descriptor and program diary files.

You have to compile (make) the project before debugging or monitoring it. Warning: as ISaGRAF uses the compiling date stamp to compare applications, you will be informed when opening the debugger that workbench and target applications have different version codes.

Important note: Libraries are not downloaded with embedded source code. You have to ensure that the appropriate library functions and function blocks are installed with your ISaGRAF workbench before re-compiling the uploaded application.


Compatibility issues

Upload is supported by ISaGRAF target and workbench version 3.22 or later. Extensions have been made to the communication protocol to support upload.

There is no restriction in embedding zipped source code (EZS) in a target based on ISaGRAF systems version 3.03 to 3.21, as EZS are stored in application code as standard resources. But embedded information cannot be uploaded in this case as such target does not support required communication services.


Preparing project for upload

You have to inform the ISaGRAF Code Generator that zipped source code must be embedded with the application code if you want to enable upload later. For this, press the "Upload" button in the "Compiler options" dialog box. Another dialog box enables you to check, as an option, the embedding of zipped source code. In this case, only minimum required source files will be embedded. Use other check boxes to embed also optional files.

Important note: Libraries are not downloaded with embedded source code. This includes functions and function blocks and I/O boards and equipments.

For a better understanding of Upload mechanism, please refer to the following topics:

How zipped source are stored in the target

Memory requirements on the target

About uploaded project

Compatibility issues


Optional files

In addition to the minimum required source code, the following files can also be embedded. They are options as their selection leads to extra memory requirement on the target.

Project descriptor

If not embedded, the project descriptor after upload will just indicate the upload date.

Password protection

Upload function is not protected by a password. If you want the uploaded project protected, you have to embed its password protection system with source code.

Comments for not connected I/O channels

ISaGRAF gives you the possibility to enter description text for non connectec I/O channels. Do not check this option is you work with connected I/Os only.

History of modifications

This is the global history of modifications for the project.

Diary files

Diary file of each program contains user written notes plus the history of compiler output messages referring to the program. Embedding diary files may consume a lot of memory in target.

Lists of variables and time diagrams

These are the files created during debug, and containing lists of variables names for list or time diagram monitoring.

Graphics, icons and bitmaps

This includes ISaGRAF graphics, plus all attached icon and bitmap files, if they are located in the project directory. Warning: embedding diary files may consume a lot of memory in target.