Serial ModbusRTU without GUI
07 Mar 2011 10:15 #7614
by myed
Serial ModbusRTU without GUI was created by myed
Hi !
I'm trying to run classicladder without EMC.
If I run:
loadusr -w classicladder --modmaster mymill.clp
my ladder work OK!
If I run:
loadusr -w classicladder --nogui --modmaster mymill.clp
modbus not work!
Can anyone help?
Thanks,
Edward.
I'm trying to run classicladder without EMC.
If I run:
loadusr -w classicladder --modmaster mymill.clp
my ladder work OK!
If I run:
loadusr -w classicladder --nogui --modmaster mymill.clp
modbus not work!
Can anyone help?
Thanks,
Edward.
Please Log in or Create an account to join the conversation.
07 Mar 2011 19:26 #7619
by cmorley
Replied by cmorley on topic Re:Serial ModbusRTU without GUI
You must have the gui running for modbus to work.
They are tied together and it looks like a lot of work to separate them.
Maybe I should add the ability to hide the GUI - that might be an easier hack.
They are tied together and it looks like a lot of work to separate them.
Maybe I should add the ability to hide the GUI - that might be an easier hack.
Please Log in or Create an account to join the conversation.
08 Mar 2011 07:04 #7625
by myed
Replied by myed on topic Re:Serial ModbusRTU without GUI
Thanks, Chris !
Not to worry. I am a novice user EMC and I assumed that Modbus can operate autonomously.
May be in main function classicladder.c add <<< if (modmaster) { PrepareModbusMaster( ); } >>>
if (nogui==TRUE)
{
rtapi_print("INFO CLASSICLADDER- No ladder GUI requested-Realtime runs till HAL closes.\n");
ClassicLadder_InitAllDatas( );
ProjectLoadedOk = LoadProjectFiles( InfosGene->CurrentProjectFileName );
if (pathswitch){ strcpy( InfosGene->CurrentProjectFileName, NewPath ); }
if (modmaster) { PrepareModbusMaster( ); } // here ???
InfosGene->LadderState = STATE_RUN;
ClassicLadder_FreeAll(TRUE);
hal_ready(compId);
hal_exit(compId);
return 0;
} else {
Thanks,
Edward.
Not to worry. I am a novice user EMC and I assumed that Modbus can operate autonomously.
May be in main function classicladder.c add <<< if (modmaster) { PrepareModbusMaster( ); } >>>
if (nogui==TRUE)
{
rtapi_print("INFO CLASSICLADDER- No ladder GUI requested-Realtime runs till HAL closes.\n");
ClassicLadder_InitAllDatas( );
ProjectLoadedOk = LoadProjectFiles( InfosGene->CurrentProjectFileName );
if (pathswitch){ strcpy( InfosGene->CurrentProjectFileName, NewPath ); }
if (modmaster) { PrepareModbusMaster( ); } // here ???
InfosGene->LadderState = STATE_RUN;
ClassicLadder_FreeAll(TRUE);
hal_ready(compId);
hal_exit(compId);
return 0;
} else {
Thanks,
Edward.
Please Log in or Create an account to join the conversation.
08 Mar 2011 08:18 - 08 Mar 2011 08:19 #7627
by cmorley
Replied by cmorley on topic Re:Serial ModbusRTU without GUI
Here's a patch to try.
It adds --hidegui to classicladder
You might have to add it by hand.
let me know if it works and i'll try to add it to the next major release.
It adds --hidegui to classicladder
You might have to add it by hand.
let me know if it works and i'll try to add it to the next major release.
Last edit: 08 Mar 2011 08:19 by cmorley.
Please Log in or Create an account to join the conversation.
08 Mar 2011 08:21 #7628
by cmorley
Replied by cmorley on topic Re:Serial ModbusRTU without GUI
I had to rename it .txt as .patch is not allowed....
Please Log in or Create an account to join the conversation.
08 Mar 2011 08:54 #7629
by myed
Replied by myed on topic Re:Serial ModbusRTU without GUI
Thanks, Chris !
I 'll try and report the results.
Best regards,
Edward.
I 'll try and report the results.
Best regards,
Edward.
Please Log in or Create an account to join the conversation.
08 Mar 2011 19:20 #7654
by myed
Replied by myed on topic Re:Serial ModbusRTU without GUI
Please Log in or Create an account to join the conversation.
09 Mar 2011 04:58 #7662
by cmorley
Replied by cmorley on topic Re:Serial ModbusRTU without GUI
I think it is safe to ignore this error.
you can get the same warning if you load classicladder with a gui then 'unload classicladder' in the HAL environment.
It happens because when you unload a component it doesn't use the regular exit point of classicladder, it forces it to close.
This should probably be done better...
Chris M
you can get the same warning if you load classicladder with a gui then 'unload classicladder' in the HAL environment.
It happens because when you unload a component it doesn't use the regular exit point of classicladder, it forces it to close.
This should probably be done better...
Chris M
Please Log in or Create an account to join the conversation.
09 Mar 2011 06:13 #7663
by myed
Replied by myed on topic Re:Serial ModbusRTU without GUI
Hi, Chris !
I understood everything.
Thanks !
Best regards,
Edward.
I understood everything.
Thanks !
Best regards,
Edward.
Please Log in or Create an account to join the conversation.
Time to create page: 0.235 seconds