Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
768f3377
Commit
768f3377
authored
Feb 01, 2017
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb script create_io_list, signals and channels in libhier omitted
parent
b3651991
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
wb/exp/com/src/wb_create_iolist.pwr_com
wb/exp/com/src/wb_create_iolist.pwr_com
+30
-1
No files found.
wb/exp/com/src/wb_create_iolist.pwr_com
View file @
768f3377
...
@@ -12,6 +12,22 @@
...
@@ -12,6 +12,22 @@
#
#
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
function string get_device_name(string object)
string parent;
string class;
parent = GetParent(object);
while(parent != "")
class = GetObjectClass(parent);
if(class == "Pb_Profiboard" || class == "$Node" || class == "Modbus_Master" || class == "PnControllerSoftingPNAK")
return parent;
endif
parent = GetParent(parent);
endwhile
return "";
endfunction
function int print_channels( int fp, string chanclass, string sigclass)
function int print_channels( int fp, string chanclass, string sigclass)
string signal;
string signal;
string attr;
string attr;
...
@@ -26,11 +42,17 @@ function int print_channels( int fp, string chanclass, string sigclass)
...
@@ -26,11 +42,17 @@ function int print_channels( int fp, string chanclass, string sigclass)
string sdescr;
string sdescr;
string cdescr;
string cdescr;
int found;
int found;
string devname;
sigcnt = 0;
sigcnt = 0;
signal = GetClassListAttrRef( sigclass);
signal = GetClassListAttrRef( sigclass);
while ( signal != "")
while ( signal != "")
if ( InLib( signal))
signal = GetNextAttrRef( sigclass, signal);
continue;
endif
attr = signal + ".SigChanCon";
attr = signal + ".SigChanCon";
sigchancon = GetAttribute( attr);
sigchancon = GetAttribute( attr);
...
@@ -61,6 +83,13 @@ function int print_channels( int fp, string chanclass, string sigclass)
...
@@ -61,6 +83,13 @@ function int print_channels( int fp, string chanclass, string sigclass)
channel = GetClassListAttrRef( chanclass);
channel = GetClassListAttrRef( chanclass);
while ( channel != "")
while ( channel != "")
if ( InLib( channel))
channel = GetNextAttrRef( chanclass, channel);
continue;
endif
devname = get_device_name( channel);
found = 0;
found = 0;
for ( i = 0; i < sigcnt; i++)
for ( i = 0; i < sigcnt; i++)
if ( sigchancons[i] == channel)
if ( sigchancons[i] == channel)
...
@@ -82,7 +111,7 @@ function int print_channels( int fp, string chanclass, string sigclass)
...
@@ -82,7 +111,7 @@ function int print_channels( int fp, string chanclass, string sigclass)
cdescr = GetAttribute( attr);
cdescr = GetAttribute( attr);
# Write to temporary file
# Write to temporary file
fprintf( fp, "%s;%s;\"%s\";\"%s\"
\n", channel, signal, sdescr, cdescr
);
fprintf( fp, "%s;%s;\"%s\";\"%s\"
;%s;%s\n", channel, signal, sdescr, cdescr, sigclass, devname
);
channel = GetNextAttrRef( chanclass, channel);
channel = GetNextAttrRef( chanclass, channel);
endwhile
endwhile
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment