You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been programming PLC for over 20 years and I can say that LDmicro is
a program at the highest professional level, really fantastic!
i using arduino mega 2560 ..I want to report the following problem :
Persist does not work ..I have identified the problem , the generate code from ldmicro is:
if(Read_Ib_rung_top()) {
if(!Read_Ib_once_4_PERSIST_variabile_sp_minuti()) {
Write_Ib_scratch(0);
Write1_Ib_scratch(); // EEPROM is ready
if(!Read_Ib_scratch()) {
Write_Ib_once_4_PERSIST_variabile_sp_minuti(1);
Ui_variabile_sp_minuti = EEPROM_read(0) + (EEPROM_read(1) << 8);
}
} else {
Write_Ib_scratch(0);
Write1_Ib_scratch(); // EEPROM is ready
if(!Read_Ib_scratch()) {
Ii_tmpVar24bit = EEPROM_read(0) + (EEPROM_read(1) << 8);
if(Ii_tmpVar24bit == Ui_variabile_sp_minuti) {
} else {
EEPROM_write(0, Ui_variabile_sp_minuti & 0xFF);
EEPROM_write(1, Ui_variabile_sp_minuti >> 8);
}
}
}
}
it does not work
I modified it as follows
if(Read_Ib_rung_top()) {
if(!Read_Ib_once_4_PERSIST_variabile_sp_minuti()) {
Write_Ib_scratch(0);
// Write1_Ib_scratch(); // EEPROM is ready
if(!Read_Ib_scratch()) {
Write_Ib_once_4_PERSIST_variabile_sp_minuti(1);
Ui_variabile_sp_minuti = EEPROM_read(0) + (EEPROM_read(1) << 8);
}
} else {
Write_Ib_scratch(0);
// Write1_Ib_scratch(); // EEPROM is ready
if(!Read_Ib_scratch()) {
Ii_tmpVar24bit = EEPROM_read(0) + (EEPROM_read(1) << 8);
if(Ii_tmpVar24bit == Ui_variabile_sp_minuti) {
} else {
EEPROM_write(0, Ui_variabile_sp_minuti & 0xFF);
EEPROM_write(1, Ui_variabile_sp_minuti >> 8);
}
}
}
}
it works properly
Release 4.3.9.0
The text was updated successfully, but these errors were encountered:
ghost
pushed a commit
that referenced
this issue
May 11, 2018
I have been programming PLC for over 20 years and I can say that LDmicro is
a program at the highest professional level, really fantastic!
i using arduino mega 2560 ..I want to report the following problem :
Persist does not work ..I have identified the problem , the generate code from ldmicro is:
if(Read_Ib_rung_top()) {
if(!Read_Ib_once_4_PERSIST_variabile_sp_minuti()) {
Write_Ib_scratch(0);
Write1_Ib_scratch(); // EEPROM is ready
if(!Read_Ib_scratch()) {
Write_Ib_once_4_PERSIST_variabile_sp_minuti(1);
Ui_variabile_sp_minuti = EEPROM_read(0) + (EEPROM_read(1) << 8);
}
} else {
Write_Ib_scratch(0);
Write1_Ib_scratch(); // EEPROM is ready
if(!Read_Ib_scratch()) {
Ii_tmpVar24bit = EEPROM_read(0) + (EEPROM_read(1) << 8);
if(Ii_tmpVar24bit == Ui_variabile_sp_minuti) {
} else {
EEPROM_write(0, Ui_variabile_sp_minuti & 0xFF);
EEPROM_write(1, Ui_variabile_sp_minuti >> 8);
}
}
}
}
it does not work
I modified it as follows
if(Read_Ib_rung_top()) {
if(!Read_Ib_once_4_PERSIST_variabile_sp_minuti()) {
Write_Ib_scratch(0);
// Write1_Ib_scratch(); // EEPROM is ready
if(!Read_Ib_scratch()) {
Write_Ib_once_4_PERSIST_variabile_sp_minuti(1);
Ui_variabile_sp_minuti = EEPROM_read(0) + (EEPROM_read(1) << 8);
}
} else {
Write_Ib_scratch(0);
// Write1_Ib_scratch(); // EEPROM is ready
if(!Read_Ib_scratch()) {
Ii_tmpVar24bit = EEPROM_read(0) + (EEPROM_read(1) << 8);
if(Ii_tmpVar24bit == Ui_variabile_sp_minuti) {
} else {
EEPROM_write(0, Ui_variabile_sp_minuti & 0xFF);
EEPROM_write(1, Ui_variabile_sp_minuti >> 8);
}
}
}
}
it works properly
Release 4.3.9.0
The text was updated successfully, but these errors were encountered: