cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
Mac_d87
New Member

Custom alerts!

Hi,

 I'm trying to see whether I can script a custom alarm to tell me when X number of consecutive points go outside some predefined UCL/ LCL values. In this example I would like to get an alarm if 240 consecutive rows in the column "HELIUM_PRESSURE" goes either above or below the UCL (15) or LCL (3). But when I run the script I get the error message:

 

not enough arguments in access or evaluation of 'Local , Local/*###*/({count = 0, idxStart = 0, outOfControl = 0})

 

I'm not sure how to fix this or whether I'm approaching the problem in the right way? Any help would be appreciated! I'm brand new to JMP (hence attaching script as an image)!

 

thanks

 

 

 

 

 

 

1 REPLY 1
jthi
Super User

Re: Custom alerts!

That script looks a bit like it was created by some LLM (chatgpt perhaps?). This part is incorrect

jthi_0-1728405781096.png

It should be fine if you remove Local(). Example from scripting index to give an idea of the syntax for functions

jthi_2-1728405857054.png

Names Default To Here(1);
// y is an optional argument
exmul = Function({x, y = 3}, x * y);
a = exmul(5);
b = exmul(5, 10);
Show(a, b);

 

Also it is very helpful if you add your script as JSL block instead of image. Press

jthi_1-1728405799273.png

and paste your script

-Jarmo