Create a TP program with KAREL

  • I have created the code to send and receive the values from the controller to the PLC via a ProfiNET.

    What kind of values?


    As mentioned before, I am new to KAREL. I am reading documents and learning through the threads created here.

    Where did you get the informations for those variables like f.e. "bHCodeREQ". For me this looks like an overboarding fantasy. :smiling_face:


    Communicating via Profinet normally works with single bits, groups of bits as unsigned integer or analog values. It's just the same as in TP programs.


    So if you have a working Profinet connection to the PLC, you can use DOUT[]/DIN[], GOUT[],GIN[] or AIN[] AOUT[].

  • These below user defined variables will Communicate with PLC. Similarly GET and SEND data.

    HCodeREQ

    HCodeACQ

    May be you think they should, but they won't.

    Code
    H1 = 1000 ; Set Laser Power to 1000 Watt
    M20 ; Set Laser to ready
    M21 ; Start Laser

    Seems to be G-Code from CNC. Robots work different. Read, and try to understand my post above.

    You don't need Karel for setting I/O to a Laser or PLC. You can use a simple TP program to set those values to DO / GO /AO.

    But you must define them properly in the settings of profinet and DI/DO and GI/GO settings.

    Has absolutely nothing to do with Karel.

Advertising from our partners