44_S7:minor fixes in ARead and AWrite

git-svn-id: https://svn.fhem.de/fhem/trunk@14915 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
charlie71
2017-08-17 18:25:44 +00:00
parent 5de2228679
commit 4a2a340c35
2 changed files with 5 additions and 3 deletions

View File

@@ -50,6 +50,9 @@ sub S7_ARead_Define($$) {
my ( $name, $area, $DB, $start, $datatype );
$name = $a[0];
AssignIoPort($hash);
if ( uc $a[2] =~ m/^[NA](\d*)/ ) {
my $Offset;
$area = "db";
@@ -210,8 +213,6 @@ sub S7_ARead_Define($$) {
push( @{ $modules{S7_ARead}{defptr}{$ID} }, $hash );
}
AssignIoPort($hash); # logisches modul an physikalisches binden !!!
$hash->{IODev}{dirty} = 1;
Log3 $name, 4,
"S7_ARead (" . $hash->{IODev}{NAME} . "): define $name Adress:$start";

View File

@@ -41,6 +41,8 @@ sub S7_AWrite_Define($$) {
my ( $name, $area, $DB, $start, $datatype, $length );
$name = $a[0];
AssignIoPort($hash);
if ( uc $a[2] =~ m/^[NA](\d*)/ ) {
my $Offset;
@@ -189,7 +191,6 @@ sub S7_AWrite_Define($$) {
$length = 1;
}
}
AssignIoPort($hash); # logisches modul an physikalisches binden !!!
$hash->{AREA} = $area;
$hash->{DB} = $DB;