KCL built-in procedure

  • Good day,


    I'm trying to interpret some KAREL code and I'm having trouble understanding the purpose of the KCL built-in procedure. So for example, when would I use...


    KCL('SET VAR $RMT_MASTER = 1',STAT) ...as opposed to...
    SET_VAR(ENTRY, '*SYSTEM*', '$RMT_MASTER', 1, STAT) ...?


    Why would I want to execute a KCL command from a KAREL program?


    Thanks for your help.

  • KCL can be implemented outside of KAREL. You can build several lines of KCL code in a text editor and deploy as a .CM file for setting up common system variables, but you won't be able to set up as much stuff as you can with a KAREL file. For instance, you can't label your IO with KCL but you can with KAREL. You can run programs with KCL or KAREL from a Telnet session, or from a web browser though.


    KCL will let you write I/O and simulate ports, but you cannot read them, or I am not seeing how to do it. You also can't read or write to registers from what I have seen so far.


    It's kind of silly, but there might be some utility in there in some situations. I haven't got to play with it a whole lot.

Advertising from our partners