I’m sad

ACTION block

Explain me, please, why does it happen so that ACTION block in my LINDataBase (with activated EN input and Normal execution type) does not run (I mean that T parameter remains equal to 0)? There is certain number of such identical blocks (with different tagnames but with the same action file) in my program, and some of them run while others don't run.

I'm sorry for my English (: I'm Ukrainian :)
1 person has
this problem
+1
Reply
  • Ian Roughsedge (Product Manager - Systems) September 25, 2013 05:54
    Hi Pavel,

    There are three likely explanations:

    1) The action code is not loaded into the action block. Although the action you mention is called from the same action file and has the same action name as others in your database, the action could still fail to load. This can happen if the memory space allocated for action code becomes full, for this to make sense you need to know that action code is loaded for each function block (FB) instance i.e. action code in action block types is loaded per instance of FB, not per file/action. Check Alarms.NoAction, does it have non-zero priority? Is it raised?

    2) The action code cannot complete its execution. Although the action code is used in other FB instances and field 'T' is incrementing, in the case of your FB where field T is not incrementing then the ST code may not be running to completion. There are a few specific cases where ST reaches a point that it cannot continue (e.g. integer operations - MOD - on floating point numbers, indexing field arrays out of bounds etc.). In this case the action code stops where the error occurs. This means that the action might not run to completion. Check Alarms.BadActn, does it have non-zero priority? Is it raised? (I think, from memory, that this one is unlikely because I think that field T is updated by the runtime before the ST evaluation occurs. But it is worth checking for the alarm). If the alarm is raised, then in some LIN products there is a log file (UDZ extension) on the E: drive, it is text, look in there for detail of the error.

    3) No data other than field 'T' is changing. The action block types with a field called 'T' all include a comms optimisation such that the FB is not transmitted over the LIN if only field 'T' is changing. You don't say which product you are working on, if it was an Eycon then it would have a front panel and you could use the FB MGR to look at the block and check if 'T' was changing there. I am guessing here that you are looking through LINtools online connect. If both alarms NoAction and BadActn are not raised, then this is the most likely explanation. You can check this idea in one of two simple ways. Firstly, you could try changing the value in a field of the FB to another value so that there is definitely a data change. Secondly you could wire in the FBD from 'T' to another block (e.g. ADD2.PV_1) and then look at the wire destination.

    P.S. Don't worry about the English, it's fine.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • I’m sad
    Hi Ian!
    Thank you a lot for the quick reply!
    You are right: the action code is not loaded into some of action blocks (: Although there have been no errors in action code while compiling. How can I fix this problem?

    I also want to ask, may this be due to user tasks (maybe the controller does not have time to run all the actions)?

    P.S. I have more than 250 action blocks in my program for T940X, which operate with 6 different action codes.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Ian Roughsedge (Product Manager - Systems) September 26, 2013 16:01
    Ok, so you have Alarms.NoAction raised. If as you say you have exactly the same action file and action working in other Action style blocks, then you have run out of memory to store the action code in.

    This is very unusual for current products other than T640. I notice you are using T940X with 250 action block instances which is quite high.

    How close is the application to completion? e.g. do you have to add another 250 or are they all in there but some not working. Do you know how many are not working? Please advise.

    If you send the complete T940X configuration to the help desk we can look to see if any optimisations are possible to make the actions fit. Please send a zip/rar file to SupportUK and incude the text "Get Satisfaction - ACTION block" in the subject.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Thanks for the help, Ian.

    My application is complete. I'll send you configuration later.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned