www.promax.it
10 VTB USER GUIDE 3.4 Functions Manager In this Tree View are showed all the STRUCTURE and FUNCTIONS grouped per page. Just open the nodes to v
100 VTB USER GUIDE Reset It simulates a RESET of the HARDWARE. WARNING: The application will be restarted. Save the list of variables on file It i
101 VTB USER GUIDE Errors are sampled by directly by the target hardware in REAL TIME and they are displaied in TEMPORAL order. It is also possibl
102 VTB USER GUIDE Scope Enable the digital scope (see relative section) DEBUG.NET options It allows to set some DEBUG options. Block Read Delay
103 VTB USER GUIDE Display the content of TASK PLC WARNING: in TASK PLC it isn't possible to set a Break-Point. 13.2 Writing of a variable It
104 VTB USER GUIDE 13.4 Firmware update With DEBUG application it is possible to update the FIRMWARE of the hardware in use. WARNING: FIRMWARE upd
105 VTB USER GUIDE 13.5 Digital Scope DEBUG.NET provides a SCOPE application to further support of debugging. DIGITAL SCOPE is able to monitor the
106 VTB USER GUIDE Selects the variable to connect to a channel. The variable must be in the WATCH window. Enables or disables the TRACK of a chan
107 VTB USER GUIDE 14 CANOPEN CONFIGURATOR The CanOpen Configurator software, is a tool that is included in the VTB IDE package and allow to descr
108 VTB USER GUIDE 14.3 Main interface Tool bar Menu bar Configuration panel Characteristics of PDO
109 VTB USER GUIDE Can Open Configurator interface, appear as a standard Windows style application, with classics menu and tool bar. Then there is
11 VTB USER GUIDE 4 CONFIGURATION OF VTB From Menu Tools Options This command is used to configure some options of the VTB environment and th
110 VTB USER GUIDE Configuration panel The Configuration panel it's the real work area of the application. It shows the actual net
111 VTB USER GUIDE The tree structure displays the composition of the configured CanOpen net. The root it's the project name and every branch
112 VTB USER GUIDE Change PDO configuration Now, let's see how we can change or add a PDO configuration in a slave device. To change the PDO
113 VTB USER GUIDE With a double-click on one of it, will open a form where we can see and set the object that we want to manage. It shows the name
114 VTB USER GUIDE 14.4 PDO characteristics panel This panel make a summary of PDO properties. On the upper edge, it shows the number of devices
115 VTB USER GUIDE 14.5 Project management How to add a node To add a node in a project, we have two main possibility: • add a node using a EDS
116 VTB USER GUIDE Opening a project Starting the Configuratore inside VTB IDE, it will automatically open the configuration related to the VTB pr
117 VTB USER GUIDE Open a configuration The “+lib” button (see 109), gives the access to the library, where a particular configuration can be sele
118 VTB USER GUIDE There are displayed three I/O slaves, old Promax devices named CanIo and CanAx, that have the RX1
119 VTB USER GUIDE The first one is the “packed” PDO, this PDO will be read from all three slaves for the output state. But how can they split its
12 VTB USER GUIDE Standard Mode OBSOLETE Debug Mode OBSOLETE Debug Standard OBSOLETE Debug.NET It forces the use of the new DEBUG.NET appli
120 VTB USER GUIDE Index 1 INTRODUCTION ...
121 VTB USER GUIDE 7 OPERATORS ...
122 VTB USER GUIDE SER_PUTBLK ... 48
123 VTB USER GUIDE IMS_READ ... 63
124 VTB USER GUIDE TEMPERATURE READING ON NG35 ... 79 11.10 Functions for NGMsX -
125 VTB USER GUIDE 12.1 Enabling the creation of the COMPONENT NGFRAMEWORK ... 96 12.2 Exporting VARIABLES ...
13 VTB USER GUIDE 4.3 Field-Bus Protocol These options allow to select the Field-Bus protocols used by the target hardware. For the moment the p
14 VTB USER GUIDE function open_cancfgerr(nodes as char) as void nodes = Total number of nodes in the CanOpen configuration. Thi
15 VTB USER GUIDE 4.4 Target Hardware Configuration An application must always refer to the target hardware. That allows VTB to preconfigure fo
16 VTB USER GUIDE 5 TASKS MANAGED BY VTB VTB provides the programmer for TASKS wich can be combined to create an application. Two of these are i
17 VTB USER GUIDE 5.1 Task Plc This task is the higest priority one: it is deterministic and run at fixed time making it suitable to manage situ
18 VTB USER GUIDE 5.2 Task Time TASK TIME, like TASK PLC, works at fixed time. It deffers from that for two features: a) it has a lower priprity
19 VTB USER GUIDE Also there is a section MASTER EVENT but it has been left only for compatibility with older versions and therefore it must not be
2 VTB USER GUIDE The information contained in this document are for informational purposes only and are subject to change without notice and should
20 VTB USER GUIDE 6 VARIABLES TYPE VTB can manage several types of variables which can be used in programming phase. Commonly all VARIABLES will b
21 VTB USER GUIDE 6.2 Internal Variable These variables are allocated in the VOLATILE MEMORY (RAM) of the system and are zeroed at reset. The po
22 VTB USER GUIDE 6.3 Pointers VTB is able to manage the pointers to variables too. Pointers defines the address of allocation memory of the var
23 VTB USER GUIDE It's also possible to declare pointers to data STRUCTURES. Example This structure is been declared Used variables: poin
24 VTB USER GUIDE 6.4 Bit This type of variable can have only two values: 0 or 1, normally associated to a state OFF/ON or FALSE/TRUE. The variabl
25 VTB USER GUIDE 6.5 Arrays The arrays can be declared in the INTERNAL or STATIC variables and they can be defined as any type except the BIT on
26 VTB USER GUIDE 6.6 VCB Variables (CanOpen or EtherCAT) The variables of type VCB are common variables which reflect the state of variables allo
27 VTB USER GUIDE 6.7 System Variables Variables of type System are variables already defined by operative system, therefore we must not to declar
28 VTB USER GUIDE 6.8 Static Variables The variables of type STATIC are declared in NON-VOLATILE RAM: they aren't zeroed at reset and mainta
29 VTB USER GUIDE 6.9 Fixed Variables The variables of type FIXED are allocated at a fixed address in the internal memory of the device which, unl
3 VTB USER GUIDE 1 INTRODUCTION VTB is an integrated development environment for OBJECT oriented programming on PROMAX platforms. This environmen
30 VTB USER GUIDE 6.10 Delegates This type of variables is used to call a function by a variable. First of all the address of the function to call
31 VTB USER GUIDE 6.11 DEFINE DEFINES are complex equivalences. They are composed by the NAME and the VALUE. The name identifies the DEFINE, the VA
32 VTB USER GUIDE 6.12 Text Tables OBSOLETE 6.13 Structures The STRUCTURES can be declared only as INTERNAL variables. The fields of a structure
33 VTB USER GUIDE 7 OPERATORS The operators of VTB are common to other compilers. 7.1 Logic and Mathematical Operators These are all the logic
34 VTB USER GUIDE 7.2 Notes on Expressions VTB manages the mathematical expressions completely. Anyway we have to make WARNING when in the express
35 VTB USER GUIDE 8 MATH FUNCTIONS VTB manages a wide SET of mathematical functions. 8.1 SIN Return the sinus of an angle in a FLOAT value. Hard
36 VTB USER GUIDE Example: Used variables: angle float ctan float angle = 1.3 ‘ Define the angle in radians. ctan = 1 / Tan (angle) ‘ Cal
37 VTB USER GUIDE 8.8 ATAN2 It's similar to atan but it returns a value from -π and +π . Hardware All Syntax Atan2 (y, x) as float The
38 VTB USER GUIDE 8.10 FABS Return the absolute FLOAT value Hardware All Syntax FAbs (numero) as float The argument number can be a FLOAT val
39 VTB USER GUIDE 9 INSTRUCTIONS TO CONTROL THE PROGRAM FLOW In VTB there are a lot of instruction to control the program flow. They are similar
4 VTB USER GUIDE 3 DEVELOPMENT ENVIRONMENT The development environment of VTB has an common intuitive interface like all Windows applications. It
40 VTB USER GUIDE Label Label1 . Label Label2 9.3 GOSUB-RETURN Allow to pass the control to a SOUBRUTINE and to return at the next program instru
41 VTB USER GUIDE 9.5 INC Increments a variable of any type. Syntax Inc varname The argument varname can be any variable declared in the program.
42 VTB USER GUIDE Example Used variables: var1 int var2 int var3 int Select var1 case 10 ‘ if var1=10 ... case var2+var3 ‘ if var1=var2
43 VTB USER GUIDE For var1=0 to var1<8 ‘ Repeat 8 times ... Next var1 For var1=1 to var1<var4 step var3 ... Next var1 For var2=1 to
44 VTB USER GUIDE 10 FUNZIONI VTB manages functions with the same syntax as VISUAL BASIC. It exist a limitation in the declaration of internal var
45 VTB USER GUIDE 10.2 Declaration of the function internal variables Syntax Dim varname as type The syntax of instruction dim is composed by t
46 VTB USER GUIDE 11 SYSTEM FUNCTIONS VTB provides a wide LIBRERY to a complete management of the hardware devices. Some function can be available
47 VTB USER GUIDE SER_PUTCHAR Sends a character to the serial port. Hardware All Syntax SER_PUTCHAR (int CodeChar) Parameters CodeChar Co
48 VTB USER GUIDE SER_PRINTF Formatting print of a FLOAT value. It is the same as ser_printl but use a float value Hardware All Syntax SE
49 VTB USER GUIDE 11.2 MISCELLANEOUS API FUNCTIONS GET_TIMER Reads the system timer in units of TASK PLC (scan time). Hardware All Syntax
5 VTB USER GUIDE 3.1 Toolbar Open Project - From menu File → Open project It opens an existing project. New Project -
50 VTB USER GUIDE ALLOC Dynamic allocating of memory area. Hardware NG35 Syntax ALLOC (Long Mem) as long Parameters Mem Total amount of
51 VTB USER GUIDE 11.3 API FUNCTIONS FOR MANAGING OF STRINGS VTB doesn't use STRING variables, to manage them there are some apposite function
52 VTB USER GUIDE STRCAT Appends a copy of the source string to the destination string. Hardware All Syntax STRCMP(Char *Dest, Char *Sourc
53 VTB USER GUIDE Avalaible formats ###### Print a fixed number of characters 23456 ###.### Force the print of decimal point 123.45
54 VTB USER GUIDE Char 0 Command not written in the buffer (buffer full) 1 Command written in the buffer Notes Moveto is usually used to inte
55 VTB USER GUIDE LINETO Lineto interpolates the axis distributing the vector speed ONLY ON THE AXES OF THE CURRENT WORKING PLANE. The other axi
56 VTB USER GUIDE ‘ ********************************************************* ‘ Movement function waiting if the buffer is full ‘ ****************
57 VTB USER GUIDE Function muovi() as Void Dim test as Char Label Move test=px_arcto(vel,2,VectAssi(), Cx, Cy) if test = 0 goto Move endif EndFun
58 VTB USER GUIDE STOP Stops axis with the programmed deceleration (acc) waiting for the complete execution (axis stopped). STOP is used to stop
59 VTB USER GUIDE Note Keep in mind these rules: – AXIS MUST BE STOPPED – CHANGING INSTANTLY THE POSITION IT OCCURS A PARTICULAR SEQUENCE TO A
6 VTB USER GUIDE Background The selected objects is brought to the background of the page. It can be covered by other objects ma
60 VTB USER GUIDE variable type passed by pointer. Example Used variables: value int Ret char value=100 Ret=pxco_sdodl(1,2000,0,2,value()) '
61 VTB USER GUIDE PXCO_SDODL or PXCO_SDOUL. The read code will be written in the system variables _SYSTEM_SDOAC0 e _SYSTEM_SDOAC1. Refer to the DS
62 VTB USER GUIDE Example Used variables: pxco_nmt(2,1) ‘Set in STOP the node 1 READ_EMCY Reads the last EMERGENCY OBJECT frame sent by a CAN
63 VTB USER GUIDE For example a FLASH memory has a maximum number of writing, block erase, etc. IMS_WRITE Writes in the internal FLASH at the a
64 VTB USER GUIDE customized protocols. SET_IP Sets the parameters of TCP/IP protocol. Hardware NG35,NGMEVO Syntax SET_IP(ip as *char, s
65 VTB USER GUIDE PROTOCOL PROCESS FUNCTION This function isn't defined by system but it must be written in the application. The system wil
66 VTB USER GUIDE 11.8 DISK DRIVER FUNCTIONS Some devices, such as NG35, can manage files by the standard fyle system FAT16 (or FAT32) on optional
67 VTB USER GUIDE .OpenCreate(handle as int, path as *char) as char Creates a new file opening it in write mode, if it already exists it is ove
68 VTB USER GUIDE err=disk.OpenRead(1,”\data\table.dat”) ‘ open table.dat in the directory data if err ... endif while 1 err=disk.Read(1,dati(
69 VTB USER GUIDE .SeekRel(handle as int, offs as long) as char Sets the offset from the current position of the file. Parameters handle Re
7 VTB USER GUIDE EtherCAT Configurator It launches the EtherCAT configuration tool (see chapter ETHERCAT CONFIGURATOR). DEBUG It launches th
70 VTB USER GUIDE Syntax .Rename(oldpath as *char, newpath as *char) as char Parameters oldpath Name of file/directory to be renamed newpath N
71 VTB USER GUIDE bit 1 hidden bit 2 system bit 3 volume bit 4 directory bit 5 arch. .name(13) Short name
72 VTB USER GUIDE GETFREE Reads the property of a driver: total dimension and number of free bytes. The informations are written in the structure
73 VTB USER GUIDE REAL TIME CLOCK (RTC) When files are created in the relative fields of the FAT the actual date and time are written. For this i
74 VTB USER GUIDE 11.9 INTERFACE FUNCTIONS FOR NG35 This group of functions allows the interfacing to the hardware resource of NG35 systems. Hardw
75 VTB USER GUIDE NOTES FOR PROGRAMMING WITH DIGITAL I/O To obtain an application program more clear and stable we suggest to call the I/O functi
76 VTB USER GUIDE NG_DAC – ANALOG OUTPUTS This function allows to update the analog outputs of each channel equipped in the NG35 expansions NG-IO
77 VTB USER GUIDE NG_ENC - ENCODER INPUTS This function allows to read the quadrature encoder input of each channel equipped on the expansion car
78 VTB USER GUIDE NG_T0 – ZERO INDEX OF ENCODER This function allows to read the state of the zero index input of each encoder channel equipped i
79 VTB USER GUIDE TEMPERATURE READING ON NG35 The NG35 is equipped with a TEMPERATURE SENSOR which can be useful to monitor the internal tempera
8 VTB USER GUIDE 3.2 Project Manager The PROJECT MANAGER allows a fast selection and navigation in all the PAGES of the PROJECT. From this AREA w
80 VTB USER GUIDE 11.10 Functions for NGMsX - NGMEVO Functions for NGMsX expansion board for NGMEVO Hardware NGMEVO NG_DAC – Analog Outputs
81 VTB USER GUIDE NG_ENC - ENCODER INPUTS This function allows to read the quadrature encoder input of each channel equipped on the expansion car
82 VTB USER GUIDE 0 OFF 1 ON WARNING: THE INDEX INPUT IS DIFFERENTIAL, THE ON STATE ON OCCURS WHEN ON CH+ THERE IS A VOLTAGE
83 VTB USER GUIDE 11.11 Functions for Analog Outputs on NGQ Functions for NGQ Analog Outputs Hardware NGQ NG_DAC – Analog Outputs NGQ This f
84 VTB USER GUIDE 11.12 Functions for NGQx Analog Outputs and encoder inputs Functions for NGQx Analog Outputs and encoder inputs Hardware NGQx
85 VTB USER GUIDE ENCODER ENABLE=true on NGQ INIT Object Syntax NG_ENC(Char Chan, Long *Val) Parameters Chan Number of channel (from 0 to 1) v
86 VTB USER GUIDE Parameters Chan Number of channel (from 0 to 1) Stato State of the relay: 0 OFF (contact opened) 1 ON (contact closed) Ex
87 VTB USER GUIDE 11.13 INTERFACE FUNCTIONS FOR NGM13-NGMEVO-NGQ-NGQx This group of functions allows the interfacing to the hardware resource of N
88 VTB USER GUIDE NGQ_INIT PROPERTY-NGQ and NGQx The object provides a complete vision of all the software option to be set for the correct use o
89 VTB USER GUIDE NG_DI - DIGITAL INPUTS NGQ NGQx This function allows to read the digital input of the NGQ-NGQx The card Index must be 0 Synta
9 VTB USER GUIDE 3.3 Objects manager The OBJECTS MANAGER allows a fast selection of the objects to insert in the current page. Inside it there
90 VTB USER GUIDE NOTES FOR PROGRAMMING WITH DIGITAL I/O To obtain an application program more clear and stable we suggest to call the I/O functi
91 VTB USER GUIDE NGQ NGQx – ANALOG INPUTS The NGQ and NGQx, have up to 4 Analog Inputs (only ONE for NGQx). 12 Bit. In THE NGQ if are ENABLED th
92 VTB USER GUIDE 11.14 STEP/DIR CHANNELS-NGM13-NGMEVO-NGQ-NGPP The system NGM13,NGMEVO,NGQ e NG-PP are equipped with 4 STEP/DIR channels which a
93 VTB USER GUIDE PP_GETPOS – READING OF ACTUAL POSITION NGPP-NGMEVO This function reads the actual position of a step/dir channel. The value w
94 VTB USER GUIDE 7) Write in TASK PLC the following CODE: pp_step(0, PosAxis * RappX) 8) Write in MAIN TASK the test code to exe
95 VTB USER GUIDE 4) Declare the following GLOBAL VARIABLES: PosAxes(2) long - position of the axis Rapp(2) Float - ratio between generated s
96 VTB USER GUIDE The flag DisableStep allows the stop of steps generation. Then at the moment we need to execute an axis preset, referring to the
97 VTB USER GUIDE 12.2 Exporting VARIABLES We can export the desired variable to FRAMEWORK and then, on PC, write or read them as normal variables
98 VTB USER GUIDE 13 APPLICATION DEBUG The DEBUG utility allows to control, both read and write, of all the application variables, to insert BREAK
99 VTB USER GUIDE Pagina It selects the page of the VARIABLE (if it is a local variable of a page), PAGINA 0 refer to the GLOBAL variables. Conte
Commenti su questo manuale