Dear all, The idea came up to have more build-time tests also for the classicladder. In that context I would like to discuss a minimal setup required for the invocation of classicladder. I eventually came up with
$ cat cltest/test.hal #!/usr/bin/halcmd -f loadrt classicladder_rt show thread loadrt threads name1=threadLadder period1=20000000 show thread addf classicladder.0.refresh threadLadder show thread and this seems to make some sense $ cltest/test.hal Note: Using POSIX non-realtimecreating ladder-state Realtime Threads: Period FP Name ( Time, Max-Time ) Realtime Threads: Period FP Name ( Time, Max-Time ) 20000000 YES threadLadder ( 0, 0 ) Realtime Threads: Period FP Name ( Time, Max-Time ) 20000000 YES threadLadder ( 0, 0 ) 1 classicladder.0.refresh and other than the typical introduction on the Internet this does not require to start AXIS or GMOCCAPY. On a sidenote, failed to find the checkbox to have classicladder started by default together with AXIS. In above setup, the classicladder GUI then starts up with $ halcmd loadusr classicladder which optionally allows to also specify a classicladder program (clp) at startup and to not show the GUI. $ halcmd show lists all the inputs and outpus of classicladder and these can be set and retrieved via the command line $ halcmd setp classicladder.0.in-00 314159 <commandline>:0: value '314159' invalid for bit <commandline>:0: setp failed $ halcmd setp classicladder.0.s32in-00 314159 $ halcmd getp classicladder.0.s32in-00 314159 $ halcmd setp classicladder.0.s32in-00 3.14159 <commandline>:0: value '3.14159' invalid for S32 <commandline>:0: setp failed $ halcmd setp classicladder.0.floatin-00 3.14159 $ halcmd getp classicladder.0.floatin-00 3.14159 $ halcmd getp classicladder.0.floatin-00 3.14159 which per se seem like some quick early tests already. It did not take me too long, i.e., before I completed the first rung to look at outputs, to get the error *** stack smashing detected ***: terminated that shut the GUI down, but somehow not completely, since $ halcmd loadusr classicladder HAL: ERROR: duplicate component name 'classicladder' $ halcmd unloadusr classicladder $ halcmd loadusr classicladder HAL: ERROR: duplicate component name 'classicladder' I am a bit uncertain how to use this all for the automated testing: These CLPs don't terminate, right? There is no "terminate" action to be triggered. I presume the tests could all sleep for two seconds and then be checked, but better ideas are welcome. Many thanks! Steffen _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
