mirror of
https://github.com/thiagoralves/OpenPLC_v3.git
synced 2026-09-25 00:42:46 +08:00
Ethercat doing a thing
This commit is contained in:
@@ -266,15 +266,10 @@ int main(int argc,char **argv)
|
||||
updateBuffersIn(); //read input image
|
||||
|
||||
pthread_mutex_lock(&bufferLock); //lock mutex
|
||||
|
||||
if(ethercat_callcyclic(BUFFER_SIZE, (uint8_t***)bool_input, (uint8_t***)bool_output, (uint8_t**)byte_input, (uint8_t**)byte_output, (uint16_t**)int_input, (uint16_t**)int_output)){
|
||||
printf("EtherCAT cyclic failed\n");
|
||||
break;
|
||||
}
|
||||
if(&bool_output[0][0]){
|
||||
printf("%QX0.0 := TRUE %i\n", &bool_output[0]);
|
||||
}
|
||||
else{
|
||||
printf("%QX0.0 := FALSE\n");
|
||||
}
|
||||
updateCustomIn();
|
||||
updateBuffersIn_MB(); //update input image table with data from slave devices
|
||||
|
||||
Reference in New Issue
Block a user