Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Subprograms not supported yet

#1
When I try to generate a robot program, I get the following error depicted in the attached picture. I tried both checking and unchecking the given options. However, I still get the same error.

Robot: JAKA Zu20
   
#2
It looks like calling subprograms is still not supported with the version of the post processor you are using.

I recommend you to activate this option to automatically include the contents of your subprograms:
  1. Select Tools-Options
  2. Select the Program tab
  3. Check the option Inline subprograms.
  4. Make sure that the subprograms are also available if your RoboDK project and linked to the same robot as the main program.
When you generate the program you'll see the contents of the subprograms in the main program file.
#3
I just tried the recommended fix, however I am still getting the same message. My post-processor script also looks incomplete (Given below):
Code:
# -*- coding: UTF-8 -*-
# Copyright 2015-2025 - RoboDK Inc. - https://robodk.com/
#
# This is a compiled post processor. Please contact us at info@robodk.com if you need access to the source code of this post processor.
#
# This file loads the compiled version of the RoboDK post processor for:
#  JAKA robot controllers
#
# More information about RoboDK Post Processors and Offline Programming:
#    https://robodk.com/help#PostProcessor
#    https://robodk.com/doc/en/PythonAPI/postprocessor.html
# ----------------------------------------------------
import sys
import os
import math
from robodk import *
# Detect Python version and post processor
print("Using Python version: " + str(sys.version_info))
path_file = os.path.dirname(__file__).replace(os.sep, "/")
print("RoboDK Post Processor: " + path_file)
# Check if the post is compatible with the Python version
version_str = str(sys.version_info[0]) + str(sys.version_info[1])
path_library = path_file + '/v' + version_str
if not os.path.isdir(path_library):
    msg = "Invalid Python version or post processor not found. Make sure you are using a supported Python version: " + path_library
    msg += "\nSelect Tools-Options-Python and select a supported Python version"
    print(msg)
    raise Exception(msg)
# Load the post processor
exec("from v" + version_str + ".JAKA import RobotPost as BasePost")
class RobotPost(BasePost):
    # ------------------------ Customize your RoboDK post processor using the following variables ------------------------
    # Default maximum number of lines per program. If a program exceeds this value it will then generate multiple "pages" (files)
    # This value can also be set in Tools-Options-Program-Maximum number of lines per program.
    MAX_LINES_X_PROG = 1000000000.0
    PROG_EXT = "jks"    # Set the program extension
    PROG_EXT_ZU = "zu"    # Set the Zu file extension
    PROG_EXT_ZUS = "zus"    # Set the Zus (sub programs) file extension
    # Default speed for linear moves in mm/s
    SPEED_MMS = 250
    # Default speed for joint moves in deg/s
    SPEED_DEGS = 60
    # Default acceleration for linear moves in mm/s^2
    ACCEL_MMSS = 250
    # Default acceleration for joint moves in deg/s^2
    ACCEL_DEGSS = 200
    # Default blend radius in millimeters (corners smoothing)
    BLEND_RADIUS_MM = 1.0
    # Minimum circle radius to output (in mm). It does not take into account the Blend radius
    MOVEC_MIN_RADIUS = 1
    # Maximum circle radius to output (in mm). It does not take into account the Blend radius
    MOVEC_MAX_RADIUS = 10000
    # --------------------------------------------------------------------------------------------------------------------
    pass
if __name__== "__main__":
    exec("from v" + version_str + ".JAKA import test_post")
    test_post()
#4
It will be easier if you can contact us requesting the source code of the JAKA post processor.

You can contact us through our contact form:
https://robodk.com/contact
#5
I just sent the request. Thanks!
#6
Hello Albert,

I have received the source code files, but I am not sure how I should be solving my current issue with those. Could you please provide some insights?

Thanks for your help!
#7
The post processor allows you to customize the behavior when you generate a program.

For example, calling a subprogram triggers the RunCode function of the post processor.
#8
(11-03-2025, 07:32 PM)ht133magnolia Wrote: Hello Albert,

I have received the source code files, but I am not sure how I should be solving my current issue with those. Could you please provide some insights?

Thanks for your help!

So, should I be replacing the current JAKA post processor situated in RoboDK/posts with the given files? I am just unable to figure out which file goes with what.
#9
If you are planning to customize your post processor I recommend you to rename it and place it in C:/RoboDK/Posts/

If you don't rename the post processor it will be overridden automatically with a new install of RoboDK.
#10
When I generate a robot program and then proceed to "Add/Edit Post Processor," the resulting Python script is the default template and does not contain the movement information from the main .jks program. I expected this Python script to hold all the movement details after program generation.

For context, in the zip folder provided by Konstantinos, there are three python files: apijaka, JAKA_POST and JAKAZu. I have copy pasted three of them into RoboDK/posts but only using the "JAKA_POST as the post processor.

I apologize for the repeated questions, but I could find only one video on post processor, therefore I am very confused.
  




Users browsing this thread:
1 Guest(s)