Displaying Error

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Displaying Error

Postby ejg3855 » Wed Jul 28, 2021 3:38 pm

I am 100% sure I have no idea how to do this but it seems simple enough.

I want a display box that calculates the difference between the commanded position and actual position from the encoder.

I have no idea where to start, In my mind I can't be that hard A -B = C.

I read over the manual but it didn't quite point me in a direction I thought would make sense.

TIA
ejg3855
 
Posts: 24
Joined: Thu Aug 15, 2019 3:01 pm

Re: Displaying Error

Postby ejg3855 » Fri Jul 30, 2021 7:34 pm

So this is kinda what I am thinking might work. Im not 100% sure how to put this together just yet.

AS3.Setfieldtext(AS3.Getfield(226)-AS3.Getfield(97),20000); Does the subtraction of two field values
AS3.Validatefield(20000); //Validates fieldtext
ejg3855
 
Posts: 24
Joined: Thu Aug 15, 2019 3:01 pm

Re: Displaying Error

Postby dezsoe » Tue Aug 03, 2021 7:58 am

Use the following format:

Code: Select all
AS3.Setfield(AS3.Getfielddouble(226) - AS3.Getfielddouble(97), 20000); // Does the subtraction of two field values
AS3.Validatefield(20000); // Validates fieldtext
dezsoe
 
Posts: 1508
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary


Return to Macros

Who is online

Users browsing this forum: No registered users and 4 guests