use warnings;
use HADES::TrbNet;
-use Dmon;
+#use Dmon;
use Time::HiRes qq|usleep|;
use Data::Dumper;
my $act_ports = trb_register_read(0xfe52,0x84); #active ports
my $to_ports = trb_register_read(0xfe52,0x8b); #ports with timeouts
-
+my $er_ports = trb_register_read(0xfe52,0xa4); #ports with sctrl error
foreach my $combs (keys %$act_ports) {
#not active or timeout
- my $mask = (((~$act_ports->{$combs}) & 0x1ffe) or ($to_ports->{$combs} & 0x1ffe));
+ my $mask = (((~$act_ports->{$combs}) & 0x1ffe) | ($to_ports->{$combs} & 0x1ffe) | ($er_ports->{$combs} & 0x1ffe));
#shift for LDO switch
$mask <<= 15;
printf("%04x\t%08x\t%08x\t%08x\n",$combs,$act_ports->{$combs},$to_ports->{$combs},$mask);
--- /dev/null
+#!/bin/bash
+(echo -n -e "\n"; sleep .1; echo -n -e "*IDN?\nOUTPUT:GENERAL OFF\nMEAS:CURR?\n"; sleep 1.7; echo -n -e "OUTPUT:GENERAL ON\nMEAS:CURR?\n";) | socat - /dev/HAMEG_HO732_VCP023842636
0x8100 0 0x8100 1 0 0xffffff 1
0x8200 0 0x8200 1 0 0xffffff 1
0x8820 0 0x8200 1 0 0xffffff 1
- 0xf3ce 0 0x82ce 1 0 0xffffff 1
- 0xc000 0 0x8000 1 0 0xffffff 1
+ 0xf3ce 0 0x82ce 1 1 0xffffff 1
+ 0xc000 0 0x8000 1 1 0xffffff 1
0xc002 0 0xc002 1 0 0xffffff 1
0xc148 0 0xc148 1 0 0xffffff 1
trbcmd s 0x790000070ef49028 0x02 0x0482
trbcmd s 0x270000070ef42328 0x03 0x0483
+#2
+trbcmd s 0x08000002e2e22b28 0x05 0xc002
+trbcmd s 0xa6000002e2e2df28 0x00 0x8200
+trbcmd s 0x51000002e2e22828 0x01 0x0201
+trbcmd s 0x72000002e2eb4628 0x02 0x0202
+trbcmd s 0xb0000002e311b928 0x03 0x0203
+
#Dirich
trbcmd s 0x58000007125dbc28 0x01 0xf3d2
echo "cts"
+trbcmd w 0xc002 0xa156 100000
trbcmd w 0xc000 0xa156 1000000
+trbcmd w 0xc000 0xa157 10000
trbcmd w 0xc148 0xa150 1000000