آپلود ویدئو | ورود | ثبت نام


محمد-

Macro Basics with EasyBuilder Pro V6 Weintek Basic Automated Sequences Commands


Embed گزارش تخلف

مشاهده 1012

دریافت ویدئو: حجم کم کیفیت بالا
توسط محمد در 06 Sep 2019
توضیحات:

Weintek USA official site - http://www.weintekusa.com
Call for pricing and availability 425-488-1100

Tutorial targeted for developers with some text programming experience.

The tutorial covers:
*Data Types
*Built In Functions
*Basic Editor Overview
*Macro Structures
*Basic Logical Statements

Macros provide the additional functionality your application may need. Macros are automated sequences of commands that are executed at run-time. Macros allow you to perform tasks such as complex scaling operations, string handling, and user interactions with your projects.

Code from this video:
Scale_to_float CODE:

macro_command main()
float TEMP, TEMP2, TIMER, HRS, MIN
unsigned int TIMER2,temp3,timrem
GetData(TIMER, "Local HMI", RW, 0, 1)
GetData(TIMER2, "Local HMI", RW, 0, 1)
TEMP = TIMER * 100
SetData(TEMP, "Local HMI", LW, 100, 1)
DELAY (1000)
GetData(TEMP, "Local HMI", LW, 100, 1)
temp2 = temp / 10
MIN = TEMP2 / 60
HRS = TEMP2 / 3600.00

SetData(min, "Local HMI", LW, 0, 1)
SetData(HRS, "Local HMI", LW, 2, 1)
temp3 = timer
timrem = 500 - TIMER2
SetData(timrem, "Local HMI", RW, 2, 1)
end macro_command

reset_all CODE:

macro_command main()
short time[3],timeSP[3]
bool bit
GetData(time[0], "Local HMI", LW, 9017, 3)
GetData(timeSP[0], "Local HMI", LW, 110, 3)
if time[2] == timeSP[2] and time[1] == timeSP[1] then
if time[0] == timeSP[0] then
bit = 1
SetData(bit, "Local HMI", LB, 10, 1)
end if
if time[0] == timeSP[0] + 10 then
bit = 0
SetData(bit, "Local HMI", LB, 10, 1)
end if
end if

SetData(time[0], "Local HMI", LW, 10, 3)
end macro_command

VIDEO_TEST CODE:

macro_command main()
unsigned int int1, int2, intARRAY[10]
short SHORT1, shortARRAY[10], I=0
float float1
char char1[10]
GetData(int1, "Local HMI", LW, 200, 1)
GetData(shortARRAY[0], "Local HMI", LW, 300, 10)
I=0
for I=0 to 9 step 1
if shortARRAY[I] == 10 then
SetData(I, "Local HMI", LW, 400, 1)
DELAY (10)
end if

next I
while I (less than symbol) 10



wend

end macro_command

لغات کلیدی:


comments powered by Disqus

درباره ما | تماس با ما | قوانین تخته سفید