make it consistent with Beremiz plc_main.c

This commit is contained in:
Thiago Alves 2019-09-02 10:34:11 -03:00 committed by GitHub
parent 820112410b
commit a2d340baee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ IEC_BOOL __DEBUG;
IEC_LINT cycle_counter = 0;
static int tick = 0;
unsigned long __tick = 0;
pthread_mutex_t bufferLock; //mutex for the internal buffers
pthread_mutex_t logLock; //mutex for the internal log
uint8_t run_openplc = 1; //Variable to control OpenPLC Runtime execution
@ -263,7 +263,7 @@ int main(int argc,char **argv)
updateCustomIn();
updateBuffersIn_MB(); //update input image table with data from slave devices
handleSpecialFunctions();
config_run__(tick++); // execute plc program logic
config_run__(__tick++); // execute plc program logic
updateCustomOut();
updateBuffersOut_MB(); //update slave devices with data from the output image table
pthread_mutex_unlock(&bufferLock); //unlock mutex