10-17-2006 06:07 PM
I am trying to create methods and use the NI Configurator 3.1.1 to display them.
I cannot seem to make any menus appear.
If I declare a Method, it appears under the NI 'Methods' menu, but I get an interpreter error.
When I run the method, I get this:
-------------------------------
Method interpreter runtime error
Error: Line 4: Undeclared identifier "_l"
Method execution did not complete
Method execution has halted
-----------------------------------------
Can you give me any ideas as to what I may be doing wrong?
10-18-2006 07:24 AM - edited 10-18-2006 07:24 AM
Message Edited by Josie on 10-18-2006 07:29 AM
10-19-2006 12:32 PM
10-20-2006 05:08 AM - edited 10-20-2006 05:08 AM
帖子被fieldbus在10-20-2006 05:08 AM时编辑过了
10-23-2006 10:39 AM
10-24-2006 04:46 AM
11-15-2006 02:46 PM
----------------------------------------
Reset Mass Total v12
----------------------------------------
-------------------------------------------------
Method interpreter runtime error.
Error: Line -1:
Method execution did not complete.
Method execution has halted.
-------------------------------------------------
If I comment out the get_acknowledgement() builtin, the method runs fine. Do I have to do anything special to display messages?Dawn
11-15-2006 02:59 PM
For what it's worth, I have found that builtins like display_message and get_acknowledgement seem to work if you declare both id and index as long and assing either or both to 0, when there is no actual id or index, then reference them when callin g the builtin. I don't know why, but it worked on 3.1.1. I don't have access to 3.2
11-15-2006 03:18 PM
I tried defining id and index and it didn't help.
METHOD reset_mass_total
{
LABEL "Reset Mass Total v14" ;
HELP "This method resets mass total to 0";
CLASS OUTPUT & DIAGNOSTIC ;
DEFINITION
{
unsigned long ids, indices;
unsigned long id;
long status, status2;
id = ITEM_ID(PARAM.RESET_MASS_TOTAL);
status = put_unsigned_value(id,0,1);
Abort_On_Builtin_Status_Error(status);
status = send_value(id,0);
Abort_On_Builtin_Status_Error(status);
ids = 0;
indices = 0;
get_acknowledgement("Mass Total has been reset to 0", ids, indices, 0);
}
}
11-15-2006 08:13 PM