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
This diff is collapsed.
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