My First Program

  • I tried to write a simple program today. I get the following error on the pendant. (Invalid application: check program parameters in call() or spawn instructions. )
    I copied the program from the manual. I named it robb.
    In robb is the following:
    begin
    for nPos = -90 to 90 step -5
    jDest.j3 = nPos
    movej(jDest,flange,mDesc)
    waitEndMove()
    endFor
    end
    The parameters are dimensioned as follows:
    jDest-Element-joint
    mDesc-Element-mdesc
    and the local...
    nPos-Collection-num


    The start file contains the following:
    begin
    taskCreate "robb", 100, robb()
    end


    After I try to load it in my application manager, I get the following on the VAL3 Studio screen:
    TakeFeature "207". Status: "ContainerNotFound"


    I tried to make an init() file and add NPos =0 but I cannot seem to find it in the same folder as robb and I get the same results.
    The controller is the CS8C. I am using VAL3 ver 7.2.1 to generate and send the files to the controller and the controller has ver.6.5.
    What am I doing wrong here?
    Thank you.

    Edited once, last by skrobot ().

  • Place your Ad here!
  • Those error messages are cryptic, but I wonder if the issue is: every Staubli VAL3 application requires a start() and stop() program. From start() you call other program to make things happen. Is this what is going on?


    Other:
    the "for nPos = -90 to 90 step -5" will produce values -90, -95, -100, ..., won't it? Is this what you want? And what happens when nPos reaches +/-180?

  • Thank you very much TygerDawg for your prompt response.
    That was a typing error with the for next statement.
    I am only able to move the arm (rs60) in Jog mode


    I just started a very short program.
    I open Val3 7.2.1
    Under New Application, I enter" HelloRobot"
    I right click under HelloRobot and add New Program
    It is also named 'HelloRobot"
    It looks like I have three files in the HelloRobot family, namely:
    HelloRobot()
    start()
    stop()


    Inside HelloRobot() between begin and end, I add the following line.
    popUpMsg("Hello Robot World")
    I open the start folder and add the following between begin and end:
    taskCreate "HelloRobot",100,HelloRobot()


    I also tried call HelloRobot() and both of these together. I got the same results in all cases.
    I click the Upload All Applications.


    I get the following:
    Version 's7.2.1' of the emulator does not match version 's6.5' of the controller.
    I enter "OK".


    Using the pendant and/or the PC screen...
    I select Application manager
    Val3 applications
    +Disk
    HelloRobot (it is set as manual.)


    I get the following error in a box:
    HelloRobot - Invalid application:
    check program parameters in call()
    or spwan instructions.


    And I do not know what spwan means. Is it sp-wan?
    I cannot find it in the instructions.


    I also tried autoload and autostart as well.
    All other files I have created are in manual mode.


    What am I doing wrong?
    Thank you.

    Edited once, last by skrobot ().

  • It has been a long time since I wrote VAL3 code, and I no longer have access to VAL3Studio or a CS8 controller. I'm going on memory. You really should be having this conversation with Staubli Technical Support. It appears that you are trying to learn the VAL3 language without benefit of going to a class.


    Suggestion: name your application HelloRobot or whatever. Call your main operating program main() or whatever. It is less confusing.


    When you create a new application, it builds with programs start() and stop() by default. Add a new program main().


    Inside of the start() program you should be adding a CALL to main() program. When you use the Applications Manager to load the application HelloRobot, you then press the RUN button on the pendant. This action executes the start() program, and does whatever you tell it to do like execute program main().


    Is not necessary to do any createTask() yet, which if for advanced work. This is done by default anyway.


    I assume "spwan" is actually "spawn" misspelled.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners