Internal I/O signal in AS language - Beginner question

  • Hi.


    I'm fairly new to robot programming, but have gained some knowledge in the AS language the last couple of weeks. I'm working for a company that installed a Kawasaki E-series robot before I started, and now want me to modify/create new programs for the robot. Unfortunately, the guy who installed the robot was not from my country, and made the entire code with all parameter names, comments etc. in a language I do not speak. Thus, it takes me a bit longer to properly understand the code than I would like.


    1. How exactly does the internal I/O signals work?

    For example, theres an IF sentence with "IF SIG(something) THEN...", and then somewhere the signal something is assigned a number (e.g something=2034). Is the number random? How does the program know if something is turned on or not when I start the robot?

    2. How are the buttons on the interface panel of the teach pendant connected to these signals?

    For example, if I have made a button on the pendant with three different programs (let's say: 1.MOVE PALLET, 2.MOVE BOX, 3.MOVE BAG) how does the program know which program I have selected?


    I apologize if the questions are poorly phrased or explained, please let me know and I will try to expand.

    Thank you.

    • Helpful

    1.Signals 1-1000 are outputs, 1001-2000 are inputs, 2001- up are "Internal bits" the way I think of them are like b3 bits in a rs500 program. I might have the ranges off by one, feel free to correct me anyone.

    2. You can assign a signal value when you create a interface panel icon. Menu->Aux Function->#5 Advanced Settings->#9 Interface Panel

  • 2. You can assign a signal value when you create a interface panel icon. Menu->Aux Function->#5 Advanced Settings->#9 Interface Panel

    3. So I can assign any number I want between 2001 - [upper limit] as long as it's not taken by another signal then?

    4. Let's say I add another button on the interface panel for three new programs so that I now have: Button A with Program 1,2,3 and Button B with program 4,5,6. How can I then choose only one program to run (as there will be a selected program on both button A and button B)?

    Thank you very much for the reply

  • The I/O board has 32 inputs and 32 outputs, therefore 1001 - 1032 inputs, 1 - 32 outputs and internal signals are from 2000 - 2256.

    you can assign names for every kind of signal, for example:

    input1 = 1001

    input2 = 1002

    output1 = 1

    output2 = 2

    IF SIG(input1) THEN

    SIG -output1, output2


    The - in front of the output signal means that that the output is off.

    In the interface menu you can set push buttons, lamps, switches , text strings.... you need to check the operational manual section 9 for more details about the interface panel, there are some exemples there also.

    I dont understand what you are trying to do, by selecting the program via interface panel... can you explain what you want to do?

  • I dont understand what you are trying to do, by selecting the program via interface panel... can you explain what you want to do?

    Yes, sorry, I was a bit unclear.

    Basically, we have as of now 3 "actions" (technically 3 programs) we want the robot to do. One where it picks up a stack of pallets and moves it to another location, one where it picks up crates and washes them, and one where it throws away garbage. Let's call them 1.PALLETS, 2.WASH and 3.GARBAGE. On the teach pendant these 3 "actions" are shown on a button called PROGRAMMES, so that you can choose which of the actions you want to run. Every friday we run 3.GARBAGE for example.

    So how would I add a fourth action, seeing as there is only space for 3 actions on each button? My idea would be to just make another button with more actions, but with my (limited) experience with the teach pendant I dont understand how to then select action 4, without also selecting one of the actions from the first button. In other words, is there any way to "de-select" the actions on the first button?

    Hope that makes it more clear. I'm sorry if its a stupid question, but I really appreciate the help:)

  • Hi,

    why don't use a simple variable instead of a signal, example:

    1) In the IF Panel create a VARIABLE DATA DISPLAY associated with the variable id_name

    2) In your job you will have:

    IF id_name==1 THEN



    IF id_name==2 THEN



    or using a switch case

    CASE id_name OF

    VALUE 1:


    VALUE 2:

    VALUE 3:

    ... and so on


    In that way you are free to have a lot of "actions"

  • You can use switch buttons with 2 positions (ON/OFF) in the interface panel for each task that you want the robot to do. For example

    pallets = 2001

    wash = 2002

    garbage ´= 2003

    After that you can use if conditions... For example

    IF SIG(pallets) == TRUE THEN

    CALL pallets


    IF SIG(wash) == TRUE THEN

    CALL wash


    IF SIG(gargabe) == TRUE THEN

    CALL gargabe


    I hope that i answer your question.

  • Welcome to the forum...............:beerchug:

    Not a lot more to add really.

    You could consider using the digital Switch option in Aux 0509 which can be used as BCD or Binary in conjunction with CASE statements or BITS commands.

    If 'your guy' has used program naming conventions like pg0,pg1 etc, they are some alternative features that could be used.

    I suspect he hasn't and what Motouser and Alexandru have already stated are the most common and simplest forms or program selection.

    Any chance you can provide an example of what the guy currently installed (without compromising any company IP)?

  • All names are unfortunately in a foreign language, but I did what Motouser and Alexandru suggested and it seems like it is working.

    Any chance you can provide an example of what the guy currently installed (without compromising any company IP)?

    He installed a main function that's running as long as the robot is on, with several IF statements for each program. The problem for me was understanding how to create the signal that decides which program to run, luckily ericwiz7923 gave a helping hand and explained how to do it on the teach pendant. I was told to share as little as possible, but if you think it could help others I may be able to modify it a bit and then share some.


  • It sounds like 'your guy' is using PC Program area then.

    This area is for 'background programs' that can be set to start up on controller power up.

    Usually they are used to 'listen' for external signals coming in from the field/plc etc or IF panel interfacing.

    If you've been told to share as little as possible, then best not to just in case.......:respect:

    I was just asking as 'we' could assist in explaining what is going on, and help you understand it a bit more, but sounds like you're on the right track.....:top:

  • An addition question on this topic, as I am struggling with dedicated signals on controller D.

    I'm particularly interested in signals for: motor, error, emg button, cycle start, repeat on, teach lock, hold on, home.

    Their status is used to update indication lights within my robot controlling software and have some extra dependencies as well.

    In AS language in general I cannot use "ON" statements in a pc program for signals below 2000 i.e.:

    IF (SIG(32)) THEN

    ON /LVL -32 GOTO motorOFF


    as they return Illegal signal error.

    Manual also indicates that these signals are not supported for this command.

    It does work however with the 2000+ internal signals....

    IF (SIG(2001)) THEN

    ON /LVL -2001 GOTO motorOFF


    this one compiles and executes fine.

    Now, the issue emerges as there is a apparent difference between controllers D and E.

    It seems that I cannot assign dedicated signals to anything above 32 in D controller, where I can do it without any problem on E controller.

    For example on D controller:

    >defsig output

    MOTOR ON Dedication cancel? (Enter 1 to cancel.)

    Signal number 1 Change ? ( 1 - 32 ) 2001

    Illegal input data.Input again.

    On E controller, on the other hand, this can be set without any problems.

    The question is, am I doing something wrong with dedicated signal assignments on D controller?

    If not, and they cannot be assigned to 2000+ signal values, how can I achieve simmilar effect to what I managed to get on E controller - instant software notification on a dedicated signal change.



  • I was always led to believe that ON/ONI instructions could not be used in PC Tasks, and therefore have never applied them in a PC Task.

    As PC Tasks are 'scanning' anyway, It was a lot easier to just program simple IF/END/GOTO instead.

    Which can be used across the whole range of IO, variables without limitations.

    I cannot find any reference that says you can't use them though.....but I have a 'tingling feeling of possible issues' if using them in a PC Task, especially when no IGNORE command is being used.

    But saying that, from what you've written, your controller does not have the internal signals enabled for dedicated signals.

    Check your conversation........:top:

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