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
938da4d8
Commit
938da4d8
authored
May 20, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
fe955489
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
1 deletion
+145
-1
src/lib/co/src/co_api.cpp
src/lib/co/src/co_api.cpp
+5
-0
src/lib/co/src/co_api.h
src/lib/co/src/co_api.h
+1
-0
src/lib/co/src/co_lng.cpp
src/lib/co/src/co_lng.cpp
+30
-1
src/lib/rt/src/rt_plc_bcomp.c
src/lib/rt/src/rt_plc_bcomp.c
+107
-0
src/lib/rt/src/rt_rtt_menu.c
src/lib/rt/src/rt_rtt_menu.c
+2
-0
No files found.
src/lib/co/src/co_api.cpp
View file @
938da4d8
...
...
@@ -125,6 +125,11 @@ void lng_set( char *str)
Lng
::
set
(
str
);
}
char
*
lng_get_language_str
()
{
return
Lng
::
get_language_str
();
}
//
// c api to co_msgwindow
//
...
...
src/lib/co/src/co_api.h
View file @
938da4d8
...
...
@@ -41,6 +41,7 @@ void user_DevPrivToString( unsigned int priv, char *str, int size);
void
lng_get_uid
(
char
*
in
,
char
*
out
);
char
*
lng_translate
(
char
*
str
);
void
lng_set
(
char
*
str
);
char
*
lng_get_language_str
();
int
crr_signal
(
void
*
parent_ctx
,
char
*
signalname
,
void
(
*
insert_cb
)(
void
*
,
void
*
,
navc_eItemType
,
char
*
,
char
*
,
int
),
...
...
src/lib/co/src/co_lng.cpp
View file @
938da4d8
...
...
@@ -17,7 +17,7 @@ char Lng::items[][2][40] = {
{
"Open Object"
,
"ppna Objekt"
},
{
"Open Object..."
,
"ppna Objekt"
},
{
"RtNavigator"
,
"RtNavigatr"
},
{
"
Class Graph"
,
"Klass
Bild"
},
{
"
Object Graph"
,
"Objekt
Bild"
},
{
"Crossreferences"
,
"Korsreferenser"
},
{
"DataSheet"
,
"Datablad"
},
{
"Collect"
,
"Samla"
},
...
...
@@ -28,6 +28,7 @@ char Lng::items[][2][40] = {
{
"Photo"
,
"Foto"
},
{
"Fast"
,
"Snabbkurva"
},
{
"Trend"
,
"Trendkurva"
},
{
"CircuitDiagram"
,
"KopplingsSchema"
},
{
"Block Events..."
,
"Blockera Hndelser..."
},
{
"Hist Event..."
,
"Historisk lista..."
},
{
"Alarm List"
,
"Larmlista"
},
...
...
@@ -100,6 +101,7 @@ char Lng::items[][2][40] = {
{
"Man"
,
"Man"
},
{
"Auto"
,
"Auto"
},
{
"Cascade"
,
"Kaskad"
},
{
"Local"
,
"Lokal"
},
{
"Extern SetValue"
,
"Externt BrVrde"
},
{
"Force"
,
"Tvinga"
},
{
"Set value"
,
"Br vrde"
},
...
...
@@ -118,6 +120,33 @@ char Lng::items[][2][40] = {
{
"Type"
,
"Typ"
},
{
"English text not available"
,
"Svensk text finns ej tillgnglig"
},
{
"Object Reference Manual"
,
"Objekt handbok"
},
{
"Components"
,
"Komponenter"
},
{
"Signals"
,
"Signaler"
},
{
"Methods"
,
"Metoder"
},
{
"On"
,
"Till"
},
{
"Off"
,
"Frn"
},
{
"Tripped"
,
"Utlst"
},
{
"Temperature"
,
"Temperatur"
},
{
"Limits"
,
"Grnser"
},
{
"HighHigh"
,
"HgHg"
},
{
"High"
,
"Hg"
},
{
"Low"
,
"Lg"
},
{
"LowLow"
,
"LgLg"
},
{
"Used"
,
"Anvnd"
},
{
"Limit"
,
"Grns"
},
{
"Hysteresis"
,
"Hysteres"
},
{
"Delay"
,
"Frdrjning"
},
{
"Switch open"
,
"Grnslge ppen"
},
{
"Switch closed"
,
"Grnslge stngd"
},
{
"Error detected"
,
"Fel detekterat"
},
{
"Overload"
,
"verlast"
},
{
"Safety switch"
,
"Skerhetsbrytare"
},
{
"Ready"
,
"Klar"
},
{
"Extern interlock"
,
"Extern frregling"
},
{
"Contactor"
,
"Kontaktor"
},
{
"Circuit breaker"
,
"Effektbrytare"
},
{
"Startlock"
,
"Startsprr"
},
{
"Frequency converter"
,
"Frekvensomriktare"
},
};
...
...
src/lib/rt/src/rt_plc_bcomp.c
0 → 100644
View file @
938da4d8
#ifdef OS_ELN
#include stdio
#else
#include <stdio.h>
#endif
#include "pwr.h"
#include "pwr_baseclasses.h"
#include "pwr_basecomponentclasses.h"
#include "rt_plc.h"
#include "rt_gdh.h"
#include "co_time.h"
#define ODD(a) (((int)(a) & 1) != 0)
#define EVEN(a) (((int)(a) & 1) == 0)
#define max(Dragon,Eagle) ((Dragon) > (Eagle) ? (Dragon) : (Eagle))
#define min(Dragon,Eagle) ((Dragon) < (Eagle) ? (Dragon) : (Eagle))
#ifndef __ALPHA
#define abs(Dragon) ((Dragon) >= 0 ? (Dragon) : (-(Dragon)))
#endif
/**
RunTimeCounterFo
@aref runtimecounterfo RunTimeCounterFo
*/
void
RunTimeCounterFo_init
(
pwr_sClass_RunTimeCounterFo
*
o
)
{
pwr_tDlid
dlid
;
pwr_tStatus
sts
;
sts
=
gdh_DLRefObjectInfoAttrref
(
&
o
->
PlcConnect
,
(
void
**
)
&
o
->
PlcConnectP
,
&
dlid
);
if
(
EVEN
(
sts
))
o
->
PlcConnectP
=
0
;
if
(
o
->
PlcConnectP
&&
o
->
ResetP
==
&
o
->
Reset
)
((
pwr_sClass_RunTimeCounter
*
)
o
->
PlcConnectP
)
->
AccTripReset
=
1
;
}
void
RunTimeCounterFo_exec
(
plc_sThread
*
tp
,
pwr_sClass_RunTimeCounterFo
*
o
)
{
pwr_tDeltaTime
TimeSince
;
pwr_sClass_RunTimeCounter
*
co
=
(
pwr_sClass_RunTimeCounter
*
)
o
->
PlcConnectP
;
if
(
!
co
)
return
;
if
(
*
o
->
ResetP
)
co
->
TripReset
=
1
;
time_FloatToD
(
&
TimeSince
,
*
o
->
ScanTime
);
/* Test if New Trip */
if
(
co
->
TripReset
)
{
co
->
OldTripNOfStarts
=
co
->
TripNOfStarts
;
co
->
OldTripUsage
=
co
->
TripUsage
;
co
->
OldTripTime
=
co
->
TripTime
;
co
->
OldTripRunTime
=
co
->
TripRunTime
;
co
->
TripNOfStarts
=
0
;
co
->
TripRunTime
.
tv_sec
=
co
->
TripRunTime
.
tv_nsec
=
0
;
co
->
TripTime
.
tv_sec
=
co
->
TripTime
.
tv_nsec
=
0
;
clock_gettime
(
CLOCK_REALTIME
,
&
co
->
ResetTime
);
co
->
TripReset
=
0
;
}
/* Update Calendar time */
time_Dadd
(
&
co
->
TotalTime
,
&
co
->
TotalTime
,
&
TimeSince
);
time_Dadd
(
&
co
->
TripTime
,
&
co
->
TripTime
,
&
TimeSince
);
/* Test if running */
o
->
Start
=
0
;
if
(
*
o
->
RunningP
)
{
/* New start ? */
if
(
!
o
->
Running
)
{
o
->
Start
=
1
;
co
->
TotalNOfStarts
++
;
co
->
TripNOfStarts
++
;
clock_gettime
(
CLOCK_REALTIME
,
&
co
->
StartTime
);
}
/* End if new start */
/* Update Running Time */
time_Dadd
(
&
co
->
TripRunTime
,
&
co
->
TripRunTime
,
&
TimeSince
);
time_Dadd
(
&
co
->
TotalRunTime
,
&
co
->
TotalRunTime
,
&
TimeSince
);
}
/* End if Running */
o
->
Running
=
co
->
Running
=
*
o
->
RunningP
;
/* Calculate usage % */
if
(
co
->
TotalRunTime
.
tv_sec
)
co
->
TotalUsage
=
((
float
)
co
->
TotalRunTime
.
tv_sec
)
/
co
->
TotalTime
.
tv_sec
*
100
;
if
(
co
->
TripTime
.
tv_sec
)
co
->
TripUsage
=
((
float
)
co
->
TripRunTime
.
tv_sec
)
/
co
->
TripTime
.
tv_sec
*
100
;
}
src/lib/rt/src/rt_rtt_menu.c
View file @
938da4d8
...
...
@@ -5131,6 +5131,7 @@ static int rtt_print_value(
if
(
flags
&
PWR_MASK_POINTER
)
{
/* Check that it is a rtdb pointer */
if
(
value_ptr
==
0
)
{
/* This is not a rtdb pointer */
if
(
init
||
(
strcmp
(
old_value
,
"UNDEF PTR"
)
!=
0
))
...
...
@@ -5539,6 +5540,7 @@ static int rtt_edit_print_value(
if
(
menu_ptr
->
flags
&
PWR_MASK_POINTER
)
{
/* Check that it is a rtdb pointer */
if
(
menu_ptr
->
value_ptr
==
0
)
{
/* This is not a rtdb pointer */
if
(
init
||
(
strcmp
(
menu_ptr
->
old_value
,
"UNDEF PTR"
)
!=
0
))
...
...
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