mrmss
Lifetime Supporting Member
Hi,
I have never done any STL thus far but I now need to do some inderect addressing. I'm trying to write to a DB register by having a drop-down list in a HMI as the index and then some STL to use that as a pointer. The objective is to put a value from a textbox into the right register.
I started out with a FC to read from the DB and display on HMI and then a seperate FC to write to the DB from the HMI. I decided this wasnt very efficient so I've been trying to get it into just a single FC.
I have a problem with the writing bit. It just doesnt do anything! The value never gets written to the DB and the HMI flag never gets reset.
Can anyone de-bug this for me please?
I have never done any STL thus far but I now need to do some inderect addressing. I'm trying to write to a DB register by having a drop-down list in a HMI as the index and then some STL to use that as a pointer. The objective is to put a value from a textbox into the right register.
I started out with a FC to read from the DB and display on HMI and then a seperate FC to write to the DB from the HMI. I decided this wasnt very efficient so I've been trying to get it into just a single FC.
I have a problem with the writing bit. It just doesnt do anything! The value never gets written to the DB and the HMI flag never gets reset.
Can anyone de-bug this for me please?
Code:
A "dbHMItoPLC".blParamWrite// user confirms
FP "Tag_131"
JNB Label_1
L "almLimHiHMIindx" // read in pointer
SLD 5 // Offset for real
LAR1
OPN "dbAlarmLimits"
L "dbPLCHMI".prmAlmLmHi
T DBD [ AR1 , P#0.0 ] // SEND COPY OUT
Label_1 : A BR
R "dbHMItoPLC".blParamWrite//reset user confirm