mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
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:
parent
3fcaeb9286
commit
bbd26f65ee
@ -50,6 +50,9 @@ sub S7_ARead_Define($$) {
|
|||||||
my ( $name, $area, $DB, $start, $datatype );
|
my ( $name, $area, $DB, $start, $datatype );
|
||||||
|
|
||||||
$name = $a[0];
|
$name = $a[0];
|
||||||
|
|
||||||
|
AssignIoPort($hash);
|
||||||
|
|
||||||
if ( uc $a[2] =~ m/^[NA](\d*)/ ) {
|
if ( uc $a[2] =~ m/^[NA](\d*)/ ) {
|
||||||
my $Offset;
|
my $Offset;
|
||||||
$area = "db";
|
$area = "db";
|
||||||
@ -210,8 +213,6 @@ sub S7_ARead_Define($$) {
|
|||||||
push( @{ $modules{S7_ARead}{defptr}{$ID} }, $hash );
|
push( @{ $modules{S7_ARead}{defptr}{$ID} }, $hash );
|
||||||
}
|
}
|
||||||
|
|
||||||
AssignIoPort($hash); # logisches modul an physikalisches binden !!!
|
|
||||||
|
|
||||||
$hash->{IODev}{dirty} = 1;
|
$hash->{IODev}{dirty} = 1;
|
||||||
Log3 $name, 4,
|
Log3 $name, 4,
|
||||||
"S7_ARead (" . $hash->{IODev}{NAME} . "): define $name Adress:$start";
|
"S7_ARead (" . $hash->{IODev}{NAME} . "): define $name Adress:$start";
|
||||||
|
@ -41,6 +41,8 @@ sub S7_AWrite_Define($$) {
|
|||||||
my ( $name, $area, $DB, $start, $datatype, $length );
|
my ( $name, $area, $DB, $start, $datatype, $length );
|
||||||
|
|
||||||
$name = $a[0];
|
$name = $a[0];
|
||||||
|
|
||||||
|
AssignIoPort($hash);
|
||||||
|
|
||||||
if ( uc $a[2] =~ m/^[NA](\d*)/ ) {
|
if ( uc $a[2] =~ m/^[NA](\d*)/ ) {
|
||||||
my $Offset;
|
my $Offset;
|
||||||
@ -189,7 +191,6 @@ sub S7_AWrite_Define($$) {
|
|||||||
$length = 1;
|
$length = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AssignIoPort($hash); # logisches modul an physikalisches binden !!!
|
|
||||||
|
|
||||||
$hash->{AREA} = $area;
|
$hash->{AREA} = $area;
|
||||||
$hash->{DB} = $DB;
|
$hash->{DB} = $DB;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user