1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Fanuc Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Question about BG Logic

  • amanmani
  • September 25, 2013 at 6:23 PM
  • Thread is Resolved
  • amanmani
    Trophies
    3
    Posts
    6
    • September 25, 2013 at 6:23 PM
    • #1

    I wish to create a user alarm when a certain DI gets on but I am not able to write User alarm in BG logic as I am getting syntax error .
    Please help me guys I am a newbie and wish to learn

    Thanks in advance !!!!! :help: :help:

  • scotty
    Reactions Received
    43
    Trophies
    5
    Posts
    497
    • September 26, 2013 at 7:40 AM
    • #2

    In BG from all syntaxis you can you assign. Write your source code that was be easier.

  • amanmani
    Trophies
    3
    Posts
    6
    • September 26, 2013 at 4:36 PM
    • #3

    I have been trying to implement following logic

    IF(DI[23]=ON),JMP LBL[1]
    LBL[1]
    UALM[1]

    But I am not able to display User alarm as it is showing INTP-443 INVALID ITEM FOR MIXED LOGIC.

    Can you help me generate alarm for the above logic or if there is any other way to generate alarm, then please tell me.

    Thanks in advance
    :help: :help:

    Edited once, last by amanmani (September 26, 2013 at 4:58 PM).

  • PMC
    Guest
    • September 26, 2013 at 9:37 PM
    • #4

    Create a macro and put your code in it. Set the macro to run when DI[x] turns on. The user alarm serverity has an effect on how this will work. For example if the severity 6 then the macro will not complete and an alarm will be posted to the TP. If the serveriy is 0 then the user alarm is posted and the macro completes.

  • Sergei Troizky
    Reactions Received
    67
    Trophies
    6
    Posts
    650
    • September 27, 2013 at 1:59 AM
    • #5
    Quote from amanmani


    I have been trying to implement following logic

    IF(DI[23]=ON),JMP LBL[1]
    LBL[1]
    UALM[1]

    But I am not able to display User alarm as it is showing INTP-443 INVALID ITEM FOR MIXED LOGIC.

    Can you help me generate alarm for the above logic or if there is any other way to generate alarm, then please tell me.

    Thanks in advance
    :help: :help:


    BG logic does not support labels and jumps, and probably does not support UALM (not sure about the latter).

    Do it well right away. It will become bad by itself.

    Edited once, last by Sergei Troizky (September 27, 2013 at 2:00 AM).

  • scotty
    Reactions Received
    43
    Trophies
    5
    Posts
    497
    • September 27, 2013 at 7:09 AM
    • #6

    If you want to use case operator that you need to choise " if (<condition1>,<cond2>,...),...=...

  • amanmani
    Trophies
    3
    Posts
    6
    • September 27, 2013 at 9:47 AM
    • #7
    Quote from PMC


    Create a macro and put your code in it. Set the macro to run when DI[x] turns on. The user alarm serverity has an effect on how this will work. For example if the severity 6 then the macro will not complete and an alarm will be posted to the TP. If the serveriy is 0 then the user alarm is posted and the macro completes.

    Thanks for your reply and forgive my ignorance but my robot is a welding robot and I want to continuously monitor a particular DI all the time as it is a safety signal but by creating macro I will only be able to check it when macro command executes.

    I want to monitor that DI 24 hours and I am able to do it but I am not able to generate an alarm out of it so that person using pendant can also know about it otherwise PLC logic would have to be monitored every time this fault comes....
    Is there any other way to do it ?

  • amanmani
    Trophies
    3
    Posts
    6
    • September 27, 2013 at 9:49 AM
    • #8
    Quote from Sergei Troizky


    BG logic does not support labels and jumps, and probably does not support UALM (not sure about the latter).

    Is there any other way to do it ?

  • scotty
    Reactions Received
    43
    Trophies
    5
    Posts
    497
    • September 27, 2013 at 12:50 PM
    • #9

    Easy way:
    If your TP is OFF then
    BG:

    Code
    IF (DI[23]=ON),F[1]=ON

    Macros with cond on F[1]:

    Code
    UALM[1]
    F[1]=OFF
  • amanmani
    Trophies
    3
    Posts
    6
    • September 27, 2013 at 9:18 PM
    • #10
    Quote from scotty


    Easy way:
    If your TP is OFF then
    BG:

    Code
    IF (DI[23]=ON),F[1]=ON

    Macros with cond on F[1]:

    Code
    UALM[1]
    F[1]=OFF

    Thanks Scotty for your omnidirectional reply

    But would it work if TP is on ie robot is in teach mode also ? Because actually this DI will only get when robot TP is ON
    SORRY I didn't share this info coz I didn't think it would matter.

    Thanks guys for taking your time out to help me

  • scotty
    Reactions Received
    43
    Trophies
    5
    Posts
    497
    • September 28, 2013 at 9:11 AM
    • #11

    Maybe you need use the KAREL??
    sorry i'm not found UALM in Karel and in Saturday have no idea. But know in Karel here is in $UALM_MSG.
    some like this u need? :

    Code
    ...//header
    begin
    while ( F[1] = true) do
    delay(500)
    if ( DIN[23] = true) then
    RUN TASK(‘UALM_PRG’,1,FALSE,FALSE,1,STATUS)
    endif
    endwhile
    //...

    TP prog:
    UALM_PRG

    Code
    UALM[1]
    F[1]=OFF

    Edited once, last by scotty (September 28, 2013 at 10:20 AM).

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Users Viewing This Thread

  • 1 Guest
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download