Hi all,
I’m currently exploring data archiving with Tango and able to archive the data successfully with HDB and TDB (MySQL).
I would like to start/stop archiving of choosen attributes without using Mambo but with my GUI client !
i already asked question, without success, here :
http://www.tango-controls.org/community/forum/c/general/development/hdbtdb-archiving-without-mambo/?page=1
I resumed my start/stop archiving tests without going through Mambo. I am not expert with Python, but i am now using Pytango with a proxy device to speak directly to the DS. Here are my results and my questions …
STOP:
import PyTango
test_tdbarchiver = PyTango.DeviceProxy (“archiving/tdb/tdbarchiver.01_01”)
argin = [“sys/tg_test/1/short_scalar”]
test_tdbarchiver.StopArchiveAtt (argin)
print (test_tdbarchiver.state ())
OFF
print (test_tdbarchiver.status ())
No attributes to archive
The archiving has been stopped
seen in the table amt of the TDB database.
START:
list = [“true”]
list.append (“12”)
list.append (“sys/tg_test/1/short_scalar”)
list.append (“5”)
list.append (“1”)
list.append (“0”)
list.append (“archiving/tdb/tdbarchiver.01_01”)
list.append (“NULL”)
list.append (“5”)
list.append (“MODE_P”)
list.append (“14000”)
list.append (“TDB_SPEC”)
list.append (“150000”)
list.append (“259200000”)
result = test_tdbarchiver.command_inout (‘TriggerArchiveConf’, list)
print (test_tdbarchiver.state ())
ON
print (test_tdbarchiver.status ())
- KO
- OK [
sys/tg_test/1/short_scalar]
Here is the problem:
TdbArchiver is in the ‘ON’ state but no archive, no data, no files;
For archiving resumes, i must:
1- stop and restart the TdbArchiver device !
2- otherelse, send ‘init’ command with AtkPanel !
Is this normal? Where do i make the mistake?
Is there a way to send the ‘init’ command directly with the proxy device ? The command_inout() returns following error:
result=test_tdbarchiver.command_inout(‘init’)
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python2.7/dist-packages/PyTango/connection.py”, line 93, in __Connection__command_inout
r = Connection.command_inout_raw(self, name, *args, **kwds)
File “/usr/lib/python2.7/dist-packages/PyTango/connection.py”, line 118, in __Connection__command_inout_raw
return self.__command_inout(cmd_name, param)
PyTango.DevFailed: DevFailed[
DevError[
desc = please, restart device
origin = delete_device
reason = not supported
severity = ERR]
DevError[
desc = Init command failed!!
HINT: RESTART device with the Restart command of the device server adm. device
Device server adm. device name = dserver/tdbarchiver/01
origin = InitCmd.execute()
reason = API_InitThrowsException
severity = ERR]
DevError[
desc = Failed to execute command_inout on device archiving/tdb/tdbarchiver.01_01, command init
origin = Connection::command_inout()
reason = API_CommandFailed
severity = ERR]
]
Thanks,
JCM