Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LoCuM_4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango devices
BeamDiagnostics
LoCuM_4
Commits
017e4529
Commit
017e4529
authored
Apr 30, 2014
by
Sonia Minolli
Browse files
Options
Downloads
Patches
Plain Diff
Fix write & read bias on lucum pb (TANGODEVIC-135)
parent
352132c4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/LoCuM_4.cpp
+46
-9
46 additions, 9 deletions
src/LoCuM_4.cpp
src/LoCuM_4.h
+1
-0
1 addition, 0 deletions
src/LoCuM_4.h
with
47 additions
and
9 deletions
src/LoCuM_4.cpp
+
46
−
9
View file @
017e4529
...
...
@@ -789,10 +789,10 @@ Tango::DevString LoCuM_4::send_locum4_command(Tango::DevString argin)
// check current bias & property (if set)
if
(
_biasDefinedOk
)
{
if
(
bias
.
compare
(
_
bias
V
alue
)
!=
0
)
if
(
!
this
->
compare_bias
())
// compare bias setpoint (property) & current
bias
v
alue
{
// current bias value differs from property => force new bias value
std
::
string
l_bias
=
"CONF:BIAS:SOURCE
:
"
+
this
->
bias
;
std
::
string
l_bias
=
"
$01:
CONF:BIAS:SOURCE
"
+
this
->
bias
;
_DEV_TRY
(
write_read
(
l_bias
,
false
),
...
...
@@ -973,7 +973,7 @@ Tango::DevString LoCuM_4::send_locum4_command(Tango::DevString argin)
// check bias value (if defined)
if
(
_biasDefinedOk
)
{
if
(
bias
.
compare
(
this
->
_
bias
V
alue
)
!=
0
)
if
(
!
this
->
compare_bias
())
// compare bias setpoint (property) & current
bias
v
alue
{
// The current bias value differs from the property value
_biasAlarm
=
true
;
...
...
@@ -985,5 +985,42 @@ Tango::DevString LoCuM_4::send_locum4_command(Tango::DevString argin)
}
}
// ********************************************************************************************
// compare_bias()
//
// description:
// 1 - compares the bias setpoint set in device property to current bias value
// 2 - returns true if equal, false if differ
//
// **********************************************************************************************
bool
LoCuM_4
::
compare_bias
()
{
bool
biasEqual
=
false
;
// bias setpoint: MINUS, DEF, EXT, PLUS
// bias read from locum: S2_Minus, S2_0Volt, S2_EXT, S2_Plus
if
((
this
->
bias
.
compare
(
"MINUS"
)
==
0
)
&&
(
this
->
_biasValue
.
compare
(
"S2_Minus"
)
==
0
))
{
biasEqual
=
true
;
}
if
((
this
->
bias
.
compare
(
"PLUS"
)
==
0
)
&&
(
this
->
_biasValue
.
compare
(
"S2_Plus"
)
==
0
))
{
biasEqual
=
true
;
}
if
((
this
->
bias
.
compare
(
"EXT"
)
==
0
)
&&
(
this
->
_biasValue
.
compare
(
"S2_Ext"
)
==
0
))
{
biasEqual
=
true
;
}
if
((
this
->
bias
.
compare
(
"DEF"
)
==
0
)
&&
(
this
->
_biasValue
.
compare
(
"S2_0Volt"
)
==
0
))
{
biasEqual
=
true
;
}
return
biasEqual
;
}
}
// namespace
This diff is collapsed.
Click to expand it.
src/LoCuM_4.h
+
1
−
0
View file @
017e4529
...
...
@@ -304,6 +304,7 @@ private:
void
get_config
(
void
);
void
configure
(
void
);
void
get_bias
(
std
::
string
config
);
bool
compare_bias
();
};
}
// namespace_ns
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment