Commit b6de9d21 authored by claes's avatar claes

New objects

parent ecefd771
!
! Proview $Id: pwrb_c_ipcollect.wb_load,v 1.1 2007-10-15 12:09:57 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with the program, if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
! pwrb_c_ipcollect.wb_load -- Defines the class IpCollect.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Code rt_plc_data.c
! @Group Plc,PlcIO
! @Summary Expands the number of integer attributes that can be handled in a DataArithm.
! The IpCollect object expands the number of integer attribues that
! can be handled in a DataArithm object.
! @image orm_ipcollect_fo.gif
! The IpCollect has 24 integer inputs, which values are stored in an array.
! By connecting the output of the IpCollect object to a Data input of a
! DataArithm object, it is possible to handle the array in the code of the
! DataArithm. This expands the number of integer inputs to the DataArithm
! from ordinary 6 to 96, when all four data inputs are connected to IpCollect
! objects.
!
! Another advantage of IpCollect is that its sometimes convenient to have
! the values arranged in an array, to use for example in an for or
! while loop.
!
! MaxIndex should be assigned the number of used inputs in the IpCollect
! object. An input doesn't has to be connected, the value can be set at
! runtime or in the configurator.
!
! @b Example
!
! This is the code in a DataArithm which has a IpCollect object connected
! to the Da1 input.
!
! classdef Da1 IpCollect;
! int i;
!
! OI1 = 0;
! for ( i = 0; i < Da1->MaxIndex; i++)
! if ( Da1->Ip[i])
! OI1++;
!
! @b See also
! @classlink DataArithm pwrb_dataarithm.html
! @classlink IpDistribute pwrb_ipdistribute.html
!*/
Object IpCollect $ClassDef 516
Body SysBody
Attr Editor = pwr_eEditor_PlcEd
Attr Method = pwr_eMethod_Connections
EndBody
!
! IPCOLLECT Runtime Body
!
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "IpCollect"
EndBody
!/**
! @Summary Integer input
! Integer input
!
! An input doesn't has to be connected, the value can be set at
! runtime or in the configurator.
!*/
Object IpIn1 $Input 1
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip1"
EndBody
EndObject
Object IpIn2 $Input 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip2"
EndBody
EndObject
Object IpIn3 $Input 3
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip3"
EndBody
EndObject
Object IpIn4 $Input 4
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip4"
EndBody
EndObject
Object IpIn5 $Input 5
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip5"
EndBody
EndObject
Object IpIn6 $Input 6
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip6"
EndBody
EndObject
Object IpIn7 $Input 7
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip7"
EndBody
EndObject
Object IpIn8 $Input 8
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip8"
EndBody
EndObject
Object IpIn9 $Input 9
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip9"
EndBody
EndObject
Object IpIn10 $Input 10
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip10"
EndBody
EndObject
Object IpIn11 $Input 11
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip11"
EndBody
EndObject
Object IpIn12 $Input 12
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip12"
EndBody
EndObject
Object IpIn13 $Input 13
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip13"
EndBody
EndObject
Object IpIn14 $Input 14
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip14"
EndBody
EndObject
Object IpIn15 $Input 15
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip15"
EndBody
EndObject
Object IpIn16 $Input 16
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip16"
EndBody
EndObject
Object IpIn17 $Input 17
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip17"
EndBody
EndObject
Object IpIn18 $Input 18
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip18"
EndBody
EndObject
Object IpIn19 $Input 19
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip19"
EndBody
EndObject
Object IpIn20 $Input 20
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip20"
EndBody
EndObject
Object IpIn21 $Input 21
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip21"
EndBody
EndObject
Object IpIn22 $Input 22
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip22"
EndBody
EndObject
Object IpIn23 $Input 23
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip23"
EndBody
EndObject
Object IpIn24 $Input 24
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip24"
EndBody
EndObject
!/**
! Number of used inputs.
!*/
Object MaxIndex $Intern 25
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
EndBody
EndObject
!/**
! Array that contains the value of the inputs.
!*/
Object Ip $Intern 26
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_ARRAY
Attr Elements = 24
EndBody
EndObject
!/**
! Data output that can be connected to a DataArithm (or som other Data input).
!*/
Object OutDataP $Output 27
Body SysBody
Attr PgmName = "OutDataP"
Attr TypeRef = "pwrs:Type-$Float32"
Attr GraphName = "Out"
Attr Flags |= PWR_MASK_POINTER
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_PRIVATE
EndBody
EndObject
Object OutData_ObjId $Intern 28
Body SysBody
Attr PgmName = "OutData_ObjId"
Attr TypeRef = "pwrs:Type-$ObjId"
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_STATE
EndBody
EndObject
EndObject
!
! IPCOLLECT Development Body
!
Object DevBody $ObjBodyDef 2
Object PlcNode $Buffer 1
Body SysBody
Attr Class = pwr_eClass_PlcNode
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
EndObject
Object GraphPlcNode $GraphPlcNode
Body SysBody
Attr object_type = 11
Attr parameters[0] = 24
Attr parameters[1] = 2
Attr parameters[2] = 1
Attr parameters[3] = 0
Attr subwindows = 0
Attr graphmethod = 16
Attr graphindex = 0
Attr default_mask[0] = 3
Attr default_mask[1] = 1
Attr segname_annotation = 1
Attr compmethod = 51
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr executeordermethod = 2
Attr objname = "IpCollect"
Attr graphname = "IpCollect"
Attr debugpar = ""
EndBody
EndObject
!
! Template object
!
Object Template IpCollect
Body RtBody
Attr MaxIndex = 2
EndBody
EndObject
EndObject
EndSObject
!
! Proview $Id: pwrb_c_ipdistribute.wb_load,v 1.1 2007-10-15 12:09:57 claes Exp $
! Copyright (C) 2005 SSAB Oxelösund AB.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with the program, if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
! pwrb_c_ipdistribute.wb_load -- Defines the class IpDistribute.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Code rt_plc_data.c
! @Group Plc,PlcIO
! @Summary Expands the number of integer outputs that can be handled in a DataArithm.
! The IpDistribute expands the number of integer outputs that can be
! handled in a DataArithm object.
! @image orm_ipdistribute_fo.gif
!
! The IpDistribute has 24 integer outputs, which values can be set from
! an array of Int32 declared in the code of a DataArithm. By connecting
! the data input of the IpDistribute to an data output of a DataArithm,
! and placing the address of the integer array in the data output, the
! values of the array will be copied to the Ip output of the IpDistribute
! object. This expands the number of integer outputs from the DataArithm
! from ordinary 9 to 96, if all four data outputs are connected to IpDistribute
! objects.
!
! Another advantage of IpDistribute is that its sometimes convenient to have
! the values arranged in an array, for example to handle in an for or
! while loop.
!
! MaxIndex should be assigned the number of used outputs in the IpDistribute
! object. The value can be set at runtime or in the configurator.
!
! The array should be a static declared array of pwr_tInt32, with size
! greater or equal to the value in MaxIndex. Use the type pwr_sIpDistribute
! defined in $pwr_inc/rt_plc_data.h.
!
! @b Example
!
! This is the code in a DataArithm witch has a IpDistribute object connected
! to the ODa1 output.
!
! static pwr_sIpDistribute vect;
! int i;
!
! ODa1 = vect;
! for ( i = 0; i < 24; i++)
! vect[i] = 0.1 * i;
!
! @b See also
! @classlink DataArithm pwrb_dataarithm.html
! @classlink IpCollect pwrb_apcollect.html
!*/
!
Object IpDistribute $ClassDef 517
Body SysBody
Attr Editor = pwr_eEditor_PlcEd
Attr Method = pwr_eMethod_Connections
EndBody
!
! IPDISTRIBUTE Runtime Body
!
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "IpDistribute"
EndBody
!/**
! @Summary Data input connected to a data output of a DataArithm object.
! Data input connected to a data output of a DataArithm object.
! In the DataAritm code, the address of en array should be placed in
! the connected data output.
!*/
Object DataIn $Input 1
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
Attr Flags |= PWR_MASK_POINTER
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_NOREMOVE
Attr Flags |= PWR_MASK_NOINVERT
Attr Flags |= PWR_MASK_STATE
Attr GraphName = "Da"
EndBody
EndObject
!/**
! The value of the first element in the array.
!*/
Object IpOut1 $Output 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip1"
EndBody
EndObject
!/**
! The value of the second element in the array.
!*/
Object IpOut2 $Output 3
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip2"
EndBody
EndObject
!/**
! The value of the third element in the array.
!*/
Object IpOut3 $Output 4
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip3"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut4 $Output 5
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip4"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut5 $Output 6
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip5"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut6 $Output 7
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip6"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut7 $Output 8
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip7"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut8 $Output 9
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip8"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut9 $Output 10
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip9"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut10 $Output 11
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip10"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut11 $Output 12
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip11"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut12 $Output 13
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip12"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut13 $Output 14
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip13"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut14 $Output 15
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip14"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut15 $Output 16
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip15"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut16 $Output 17
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip16"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut17 $Output 18
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip17"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut18 $Output 19
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip18"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut19 $Output 20
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip19"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut20 $Output 21
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip20"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut21 $Output 22
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip21"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut22 $Output 23
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip22"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut23 $Output 24
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip23"
EndBody
EndObject
!/**
! The value of the corresponding element in the array.
!*/
Object IpOut24 $Output 25
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Ip24"
EndBody
EndObject
!/**
! Number of used outputs. This value has to be supplied by the user.
!*/
Object MaxIndex $Intern 26
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
EndBody
EndObject
EndObject
!
! IPDISTRIBUTE Development Body
!
Object DevBody $ObjBodyDef 2
Object PlcNode $Buffer 1
Body SysBody
Attr Class = pwr_eClass_PlcNode
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
EndObject
Object GraphPlcNode $GraphPlcNode
Body SysBody
Attr object_type = 11
Attr parameters[0] = 1
Attr parameters[1] = 2
Attr parameters[2] = 24
Attr parameters[3] = 0
Attr subwindows = 0
Attr graphmethod = 16
Attr graphindex = 0
Attr default_mask[0] = 1
Attr default_mask[1] = 3
Attr segname_annotation = 1
Attr compmethod = 4
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr executeordermethod = 2
Attr objname = "IpDistr"
Attr graphname = "IpDistr"
Attr debugpar = ""
EndBody
EndObject
!
! Template object
!
Object Template IpDistribute
Body RtBody
Attr MaxIndex = 2
EndBody
EndObject
EndObject
EndSObject
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment