Commit 08e2915e authored by claes's avatar claes

*** empty log message ***

parent ebb18aa4
!
! Proview $Id: nmps_c_datafread.wb_load,v 1.1 2008-04-25 11:06:02 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_datafread.wb_load -- Defines the class DataFRead.
!
SObject NMps:Class
!/**
! @Version 1.0
! @Code nmps_plc.c
! @Group Plc,PlcData
! @Summary Read the content of a data object from file.
!
! Read the content of a data object from a file.
! @image orm_datafread_fo.gif
! The read is executed when the condition input is set to true.
!
! Hint!
! The filename and condition can be set from a fileview with the xtt
! command 'open fileview'.
!
! @b See also
! @classlink GetData pwrb_getdata.html
! @classlink DataFWrite nmps_datafread.html
!*/
Object DataFRead $ClassDef 51
Body SysBody
Attr Editor = pwr_eEditor_PlcEd
Attr Method = pwr_eMethod_Connections
EndBody
!
! Runtime Body
!
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "DataFRead"
EndBody
!/**
! Data input connected to an output that keeps a reference to the data object.
!*/
Object Data $Input 1
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
Attr Flags |= PWR_MASK_POINTER
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOREMOVE
Attr GraphName = "Data"
EndBody
EndObject
!/**
! When Condition is goes from false to true, the read is executed.
! If condition is connected, it has to be reset before the next read.
! If condition is not connected it is automatically reset.
!*/
Object Condition $Input 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
Attr GraphName = "cond"
EndBody
EndObject
!/**
! @Summary String contaning the filename to read data from.
! String contaning the filename to read data from.
! The filename can be set by opening a fileview with the 'open fileview' command.
!*/
Object FileName $Input 3
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr GraphName = "File"
EndBody
EndObject
!/**
! Status of last read operation.
!*/
Object ReadStatus $Intern 4
Body SysBody
Attr TypeRef = "pwrs:Type-$Status"
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_STATE
EndBody
EndObject
!/**
! Old value of Condition to detect edge.
!*/
Object CondOld $Intern 5
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_STATE
EndBody
EndObject
!/**
! Error attribute set at read failure.
!*/
Object Error $Output 6
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_STATE
EndBody
EndObject
EndObject
!
! Development Body
!
Object GraphPlcNode $GraphPlcNode
Body SysBody
Attr object_type = 11
Attr parameters[0] = 3
Attr parameters[1] = 2
Attr parameters[2] = 1
Attr parameters[3] = 0
Attr subwindows = 0
Attr graphmethod = 0
Attr graphindex = 0
Attr default_mask[0] = 7
Attr default_mask[1] = 0
Attr segname_annotation = 1
Attr compmethod = 4
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr executeordermethod = 2
Attr objname = "DataFRead"
Attr graphname = "DataFRead"
Attr debugpar = ""
EndBody
EndObject
Object DevBody $ObjBodyDef 2
Object PlcNode $Buffer 1
Body SysBody
Attr Class = pwr_eClass_PlcNode
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview $Id: nmps_c_datafwrite.wb_load,v 1.1 2008-04-25 11:06:02 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_datafwrite.wb_load -- Defines the class DataFWrite.
!
SObject NMps:Class
!/**
! @Version 1.0
! @Code nmps_plc.c
! @Group Plc,PlcData
! @Summary Write the content of a data object to a file.
!
! Write the content of a data object to a file.
! @image orm_datafwrite_fo.gif
! The write is executed when the condition input is set to true.
!
! Hint!
! The filename and condition can be set from a fileview with the xtt
! command 'open fileview'.
!
! @b See also
! @classlink GetData pwrb_getdata.html
! @classlink DataFRead nmps_datafread.html
!*/
Object DataFWrite $ClassDef 50
Body SysBody
Attr Editor = pwr_eEditor_PlcEd
Attr Method = pwr_eMethod_Connections
EndBody
!
! Runtime Body
!
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "DataFWrite"
EndBody
!/**
! Data input connected to an output that keeps a reference to the data object.
!*/
Object Data $Input 1
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
Attr Flags |= PWR_MASK_POINTER
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOREMOVE
Attr GraphName = "Data"
EndBody
EndObject
!/**
! When Condition is goes from false to true, the write is executed.
! If condition is connected, it has to be reset before the next write.
! If condition is not connected it is automatically reset.
!*/
Object Condition $Input 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
Attr GraphName = "cond"
EndBody
EndObject
!/**
! @Summary String contaning the filename to write data to.
! String contaning the filename to write data to.
!*/
Object FileName $Input 3
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr GraphName = "File"
EndBody
EndObject
!/**
! Status of last write operation.
!*/
Object WriteStatus $Intern 4
Body SysBody
Attr TypeRef = "pwrs:Type-$Status"
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_STATE
EndBody
EndObject
!/**
! Old value of Condition to detect edge.
!*/
Object CondOld $Intern 5
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_STATE
EndBody
EndObject
!/**
! Error attribute set at write failure.
!*/
Object Error $Output 6
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_STATE
EndBody
EndObject
EndObject
!
! Development Body
!
Object GraphPlcNode $GraphPlcNode
Body SysBody
Attr object_type = 11
Attr parameters[0] = 3
Attr parameters[1] = 2
Attr parameters[2] = 1
Attr parameters[3] = 0
Attr subwindows = 0
Attr graphmethod = 0
Attr graphindex = 0
Attr default_mask[0] = 7
Attr default_mask[1] = 0
Attr segname_annotation = 1
Attr compmethod = 4
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr executeordermethod = 2
Attr objname = "DataFWrite"
Attr graphname = "DataFWrite"
Attr debugpar = ""
EndBody
EndObject
Object DevBody $ObjBodyDef 2
Object PlcNode $Buffer 1
Body SysBody
Attr Class = pwr_eClass_PlcNode
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
EndObject
EndObject
EndSObject
......@@ -554,8 +554,10 @@ Xtt commands
<b>logging <t>Logg attributes to file <LINK> logging
<b>open graph <t>Open a graph <LINK> open graph
<b>open jgraph <t>Open a java graph <LINK> open jgraph
<b>open fileview <t>Open a fileview <LINK> open fileview
<b>open trend <t>Open DsTrend or PlotGroup graph <LINK> open trend
<b>open operatorwindow<t>Open the operator window <LINK> open operatorwindow
<b>read object <t>Read the content of an object from file <LINK> read object
<b>search <t>Leta efter object eller sträng <LINK> search
<b>set advanceduser<t>Set advanced user <LINK> set advanceduser
<b>set folder <t>Set a folder in a tabbed window. <LINK> set folder
......@@ -587,7 +589,7 @@ Xtt commands
<b>show user <t>Show current user <LINK> show user
<b>sound <t>Play a sound defined by a sound object <LINK> sound
<b>store <t>Store an attribute list in a file <LINK> store
<b>write object <t>Write the content of an object to file <LINK> write object
<H2>related subjects
script <LINK> script
</TOPIC>
......@@ -934,6 +936,36 @@ JBuilder.
<B>xtt> open jgraph 'name'
</TOPIC>
<TOPIC> open fileview <style> function
Command open fileview
Opens a fileview that displays files that matches the specified pattern.
The fileview can be opened in 'Open File' or 'Save File' mode.
In open mode, a file is selected and the selected filename is written to a
string attribute in the database (target). Simultaneously a digital attribute is
set (trigger) to indicate that an open should be performed. The actual opening
can be done by a DataFRead object in th plc, but have to be programmed by the user.
In save mode, a file is selected, or a filename is entered. The filename is
written to a string attribute and a digital signal is set. The actual save
can be performed by a DataFWrite object in the plc.
<B>xtt> open fileview /file= /target= /trigger= /type=save
<B>xtt> open fileview /file= /target= /trigger= /type=open
/file <t>File pattern, containing wildcard '*', for files that is to be viewed
<t>in the fileview.
/target <t>String attribute where the selected filename will be stored.
/trigger <t>Boolean attribute that is set to indicate that a save or open should
<t>be performed.
/type <t>'save' or 'open'
<b>Example
open fileview /file="$pwrp_load/*.txt"/target=P1-Sv.ActualValue/trigger=P1-Dv.ActualValue/type=save
</TOPIC>
<TOPIC> open trace <style> function
Command open trace
......@@ -1026,6 +1058,19 @@ Search for an objectname or a string.
<B>xtt> search /next
</TOPIC>
<TOPIC> read object <style> function
Command read object
Read the content of an object from file.
Reads the content of a file, normally created by command 'write object',
and insert the value into the specified object.
<B>xtt> read object /object= /file=
/object <t>Name of object.
/file <t>Name of file to read from.
</TOPIC>
<TOPIC> set advanceduser <style> function
Command set advanceduser
......@@ -1188,6 +1233,18 @@ logging store <LINK> logging store
</TOPIC>
<TOPIC> write object <style> function
Command write object
Write the content of an object to file.
<B>xtt> write object /object= /file=
/object <t>Name of object.
/file <t>Name of file to write to.
</TOPIC>
</headerlevel>
</chapter>
......
!
! Proview $Id: rt_gdh_msg.msg,v 1.5 2007-03-14 07:49:14 claes Exp $
! Proview $Id: rt_gdh_msg.msg,v 1.6 2008-04-25 11:09:10 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -79,6 +79,9 @@ rtnotstarted <Proview runtime is not started> /error
nocclasssup <Cached Classes not supported on other node> /error
nomountobject <Mount object is missing> /error
noattr <AttrRef is not an attribute> /error
noobject <AttrRef is not an object> /error
file <Unable to open file> /error
convert <Unable to convert value> /error
.end
......@@ -670,6 +670,8 @@ palette PlcEditorPalette
class CurrentIndex
class DataCopy
class DataCnv
class DataFRead
class DataFWrite
class DataRcv
class DataRequest
class DataReset
......
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