Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SY2527Channel
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
PowerSupply
SY2527Channel
Commits
8baf33b5
Commit
8baf33b5
authored
Nov 19, 2007
by
Sebastien Leport
Browse files
Options
Downloads
Patches
Plain Diff
- fault and alarm state have got now a higher priority
parent
20ebf262
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/SY2527Channel.cpp
+61
-44
61 additions, 44 deletions
src/SY2527Channel.cpp
with
61 additions
and
44 deletions
src/SY2527Channel.cpp
+
61
−
44
View file @
8baf33b5
static
const
char
*
RcsId
=
"$Header: /users/chaize/newsvn/cvsroot/Instrumentation/SY2527Channel/src/SY2527Channel.cpp,v 1.
7
2007-1
0
-1
5 15:40:42
sebleport Exp $"
;
static
const
char
*
RcsId
=
"$Header: /users/chaize/newsvn/cvsroot/Instrumentation/SY2527Channel/src/SY2527Channel.cpp,v 1.
8
2007-1
1
-1
9 09:12:41
sebleport Exp $"
;
//+=============================================================================
//
// file : SY2527Channel.cpp
...
...
@@ -13,9 +13,13 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio
//
// $Author: sebleport $
//
// $Revision: 1.
7
$
// $Revision: 1.
8
$
//
// $Log: not supported by cvs2svn $
// Revision 1.7 2007/10/15 15:40:42 sebleport
// - in get_device_property(), we write properties in database only if they have never been written
// - slotNumber and channelNumber are described in status attribute
//
// Revision 1.6 2007/09/07 13:14:56 sebleport
// - add position_in_crate (vector) data member
//
...
...
@@ -484,8 +488,9 @@ Tango::DevState SY2527Channel::dev_state()
// Add your own code to control device here
Tango
::
DevState
state_to_return
;
std
::
stringstream
s
;
Tango
::
DevState
state_to_return
;
// concatenate internal message string
s
<<
message
<<
endl
;
...
...
@@ -510,75 +515,56 @@ Tango::DevState SY2527Channel::dev_state()
}
s
<<
"No Communication with SY2527Crate, try to init the SY2527Crate DS again"
<<
endl
;
state_to_return
=
Tango
::
FAULT
;
set_status
(
s
.
str
().
c_str
());
return
state_to_return
;
return
Tango
::
FAULT
;
}
// Manage the returned
valu
e
// Manage the returned
stat
e
// STANDBY State
if
(
status_byte
&
0x01
)
// bit 0
{
s
<<
"Channel is on"
<<
endl
;
state_to_return
=
Tango
::
STANDBY
;
}
else
// FAULT State
if
(
status_byte
&
0x400
)
// bit 10
{
s
<<
"Channel is
off
"
<<
endl
;
s
tate_to_return
=
Tango
::
OFF
;
}
s
<<
"Channel is
in calibration error
"
<<
endl
;
s
et_status
(
s
.
str
().
c_str
())
;
return
Tango
::
FAULT
;
// RUNNING State
if
(
status_byte
&
0x02
)
// bit 1
{
s
<<
"Channel is ramping up"
<<
endl
;
state_to_return
=
Tango
::
RUNNING
;
}
if
(
status_byte
&
0x04
)
// bit 2
if
(
status_byte
&
0x800
)
// bit 11
{
s
<<
"Channel is ramping down"
<<
endl
;
state_to_return
=
Tango
::
RUNNING
;
s
<<
"Channel is unplugged"
<<
endl
;
set_status
(
s
.
str
().
c_str
());
return
Tango
::
FAULT
;
}
// ALARM State
if
(
status_byte
&
0x08
)
// bit 3
{
s
<<
"Channel is over current"
<<
endl
;
state_to_return
=
Tango
::
ALARM
;
set_status
(
s
.
str
().
c_str
());
return
Tango
::
ALARM
;
}
if
(
status_byte
&
0x10
)
// bit 4
{
s
<<
"Channel is over voltage"
<<
endl
;
state_to_return
=
Tango
::
ALARM
;
set_status
(
s
.
str
().
c_str
());
return
Tango
::
ALARM
;
}
if
(
status_byte
&
0x20
)
// bit 5
{
s
<<
"Channel is under voltage"
<<
endl
;
state_to_return
=
Tango
::
ALARM
;
set_status
(
s
.
str
().
c_str
());
return
Tango
::
ALARM
;
}
if
(
status_byte
&
0x80
)
// bit 7
{
s
<<
"Channel is in max V"
<<
endl
;
state_to_return
=
Tango
::
ALARM
;
}
// FAULT State
if
(
status_byte
&
0x400
)
// bit 10
{
s
<<
"Channel is in calibration error"
<<
endl
;
state_to_return
=
Tango
::
FAULT
;
}
if
(
status_byte
&
0x800
)
// bit 11
{
s
<<
"Channel is unplugged"
<<
endl
;
state_to_return
=
Tango
::
FAULT
;
set_status
(
s
.
str
().
c_str
());
return
Tango
::
ALARM
;
}
// NO corresponding state because transient conditions
...
...
@@ -599,7 +585,38 @@ Tango::DevState SY2527Channel::dev_state()
s
<<
"Channel is in internal trip"
<<
endl
;
}
// STANDBY State
if
(
status_byte
&
0x01
)
// bit 0
{
s
<<
"Channel is on"
<<
endl
;
state_to_return
=
Tango
::
STANDBY
;
set_status
(
s
.
str
().
c_str
());
}
else
{
s
<<
"Channel is off"
<<
endl
;
state_to_return
=
Tango
::
OFF
;
set_status
(
s
.
str
().
c_str
());
}
// RUNNING State
if
(
status_byte
&
0x02
)
// bit 1
{
s
<<
"Channel is ramping up"
<<
endl
;
state_to_return
=
Tango
::
RUNNING
;
set_status
(
s
.
str
().
c_str
());
}
if
(
status_byte
&
0x04
)
// bit 2
{
s
<<
"Channel is ramping down"
<<
endl
;
state_to_return
=
Tango
::
RUNNING
;
set_status
(
s
.
str
().
c_str
());
}
return
state_to_return
;
}
...
...
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