Microsoft Word - EasyView_V30 2권-스크립트 메뉴얼_091030

Size: px
Start display at page:

Download "Microsoft Word - EasyView_V30 2권-스크립트 메뉴얼_091030"

Transcription

1 Juin EasyView V3.0 스크립트매뉴얼 등록상표 Juin EasyView, Juin EasyWeb은상표법에의하여서비스표등록원부에등록되었습니다. 사용자매뉴얼에대한저작권 Copyright c Juin Information System All right reserved. 본문서전체또는내용의일부를무단으로복사하거나배포하는것은저작권에위배됩니다. 저작권을침해하는자는손해배상의책임을지게됩니다. 모든저작권, 특허권등은해당법률에의하여보호를받습니다. 소프트웨어에대한저작권 EasyView는컴퓨터프로그램보호법에의하여저작권이보호되어있으며무단복제또는배포하는경우관련법규에의하여처벌을받을수있습니다. 매뉴얼유지보수본문서는 EasyView V3.0를기준으로만들어졌으며본문서의기술적, 정보적자료는 Release Note나새로운개정판을통하여사전통고없이변경될수있습니다. 본문서는정기적으로점검되며개선사항이발생되면다음개정판에적용되도록할것입니다. 개선사항이있으면언제든지연락주십시오. 소프트웨어유지보수 Juin EasyView V3.0는사용자의요구나회사의필요에따라사전통고없이변경될수있으며의문사항이있을시에는서문에기술되어있는연락처로문의하십시오.

2 제품구성 / 제품번호 설명 제품명 제품번호 출시일자 소프트웨어 Juin EasyView V3.0 EVK 년 07월 사용자매뉴얼 Juin EasyView 사용자매뉴얼 V3.0 EVMK 년 07월 제품소개서 Juin EasyView 제품소개서 V3.0 EVPK 년 07월 저장매체 Juin EasyView CD V3.0 EVDK 년 07월

3 서문 매뉴얼의목적본매뉴얼은사용자에게다음과같은내용을제공하여 EasyView를이용한산업자동화를효율적으로구축하게합니다. - EasyView에대한전반적인구성및개념 - EasyView에대한개략및상세기능설명 - EasyView의기능에따른상세작업절차사용자가원하는정보를목차와색인을이용하여신속하게찾을수있습니다. 사용자인터페이스방식 EasyView는 UI(User Interface) 창에키보드, 마우스클릭, 마우스의 Drag&Drop 방식을통하여사용자가원하는값을입력하고, 작업을수행할수있도록해줍니다. 사용자가 EasyView로작업하는중발생될수있는메시지형태는아래와같습니다. 에러 : 이표시는적절한조치를취하지않을경우더이상의작업이불가능. 예 ) 엔진이구동되지않는상태에서그래픽감시를실행시켰을경우. 엔진이태그정보를로딩하는동안에러가발생할때. 프로젝트관리자가설정한사용자이름이나비밀번호가틀릴경우. 경고 : 소프트웨어가요구하는값과사용자가사용하고자하는값이일치하지않을경우. 예 ) 화면을프린터로하드카피할때프린터가설정되지않은경우. 스크립트파일을컴파일하여에러가발생할경우. 태그파일을임포트할때태그정보가올바르지않은경우. 확인 : 사용자의확인을요구. 예 ) 태그의출력을 ON/OFF 하는경우. 시스템빌더에서프로젝트를삭제할경우. 변경된자료를저장하는경우.

4 정보 : 사용자가요구한작업의결과를알림. 예 ) 하드카피가성공적으로완료된경우. 태그정보의임포트나익스포트가완료된경우. 사용자필요지식 / 교육 EasyView는사용자가본매뉴얼에따라직접쉽게설치, 구축, 운영할수있으나산업자동화, MS Window, HMI(Human Mchine Interface) 등에관한기본적인지식은완성도가높은운영환경을구현하는데도움이될수있습니다. 사용자의요청시본사의규정에따라교육을제공할수있습니다. 요구시스템 - O/S : Windows NT/2000/XP/ H/W : Pentium 이상, VGA 32MB, RAM 128MB, Hard Disk 20GB - Utility Program : DB 인터페이스를하기위해서는해당 DB가설치되어있어야하고, 보고서출력시기본보고서가제공되나엑셀보고서기능을사용하기위해서는 MS Office가설치되어있어야합니다. 운영상유의사항 - EasyView가구동되고있는서버또는 PC에서특정요인에의하여과부하가발생하면시스템에영향을미칠수있으므로다른 Application Program 사용을주의하여야합니다. - 실제운영시스템에서개발할경우, 운영중인시스템에영향을주지않도록주의하여야합니다. 운영지원여부사용자가 S/W를사용중에 S/W 장애를발견, 보안요청시 7일이내에처리됩니다. 단, S/W를구매한시점이 1년을넘지않는경우에무료이며사용자는장애에대한자세한정보를제공하여야합니다.

5 제품구매시선택사항 제품명 Point Point 64 Point 128 Point 개발자용 (Development) 256 Point 512 Point 1024 Point EasyView Unlimited Point 64 point 128 point 실행용 (Runtime) 256 point 512 point EasyWeb WEB Server ( 기본 2Users) 1024 point Unlimited point 512 Point 1024 Point Unlimited Point 1 Site Unlimited User 연락처기술적또는영업적인문의사항이있을시에는아래로연락하시기를바랍니다. - 전화 : +81) FAX : +81) jisystem@jisystem.com 기타사항은

6

7 목 차 1. 스크립트 스크립트개요 스크립트개요 스크립트소개 스크립트기능 스크립트문법 변수선언 ) Dim AS 제어문 ) if 문 ) for ) do ) while ) goto ) until 함수 ) sub ) end 표준함수 ) modulus ) pi ) sin ) cos ) tan

8 6) atan ) asin ) acos ) sqr ) hypot ) pow ) abs ) exp ) log ) log ) rand ) Now ) SetTime ) GetDayOfMonth ) GetNextTime ) SetLocalTime ) GetElapsedTime 문자열을다루는함수 ) StringLen ) StringRemove ) StringReplace ) StringMid ) StringLeft ) StringRight ) StringCompare ) StringTrimLeft ) StringTrimRight ) StringMakeUpper ) StringMakeLower ) ToChar ) Hex ) MakeNumToString ) MakeStringToInt ) MakeStringToFloat

9 17) BitAnd ) BitOr Database 관련함수 ) SQLConnect ) SQLDisconnect ) SQLSelect ) SQLNumRows ) SQLNumFields ) SQLFirst ) SQLNext ) SQLLast ) SQLPrev ) SQLGetData ) SQLExecute ) RegisterOdbcDataSource 태그관련 ( 입출력 ) 함수 ) OutputDo ) OutputDi ) OutputAo ) OutputAi ) OutputSi ) OutputBlock ) SetDiValue ) SetAiValue ) SetStrValue ) GetAiValue ) GetDiValue ) SetTagProperty ) GetAiADValue ) GetAoADValue 파일과디렉토리함수 ) GetPrivateProfileString

10 2) WritePrivateProfileString ) FileExist ) GetFileList ) GetFileName ) CopyFile ) CreateDirectory ) Execute ) CloseWindow ) FileDump ) OpenFile ) SeekFile ) ReadLine ) WriteFile ) Execute ) GetSysTemDirectory 엑셀관련함수 ) OpenExcelFile ) SetActiveSheet ) SetCellValue ) PrintExcelFile ) SaveExcelFile ) CloseExcelFile 기타함수 ) PasswordDialog ) IputDialog ) CopyScanBuffer ) ClearScanBufferW ) ClearScanBufferB ) GetTickCount ) RGB ) PlaySound ) StopSound ) GetLoginId / GetUserPw / GetLoginIdLevel

11 11) SetObjectLock ) GetUnAckedAlarmCount ) Beep ) PlayWave ) Msgbox ) MessageBox 시스템접근용메소드 ) 기본알람그룹에속한알람발생개수참조 ) 프로젝트의태그개수참조 ) 프로젝트에서발생한알람개수참조 ) 태그의 Active 상태참조및설정 ) 그래픽 Object 의속성설정 ) GetNodeType ) GetNodeName ) GetInstallPath ) GetProjectName ) 시스템에등록된 I/O 디바이스명가져오기 메모리태그의태그포인터기능 태그속성참조 ) 태그값참조및설정 리스트컨트롤관련함수 ) GetItemCount ) InsertItem ) SetItemText ) SetRedraw ) SetItemCount ) SetTextColor ) SetBackColor ) EnsureVisible ) SortData ) DeleteItemAllItems ) GetItemText

12 12) DeleteItem ) Invalidate ) GetSelectionMark ) GetColumnCount ) DeleteColumn ) InsertColumn ) DeleteItemAllColumns 그래픽관련스크립트 도면이동및그래픽객체제어 ) movepage ) popuppage ) moveprotopage ) popupprotopage ) chgtagprefix ) closepage ) setalarmgroup ) ChangeProject ) HardCopy ) SetHTrend ) SetFocusObject ) SetFocusPage ) SetPagePos ) NavigateBrowserCtrl ) FindWindow ) ShowWindow ) SetWindowText ) SetPageLayer 부록 용어정리 INDEX

13 부록. 용어정리, INDEX

14

15 1. 스크립트

16 - 목차 1.1 스크립트개요 1.2 스크립트문법 1.3 그래픽관련스크립트 1-1

17 1.1 스크립트개요 스크립트소개스크립트란간단한프로그램을할수있는일종의컴퓨터프로그램언어를말하며, EasyView 자체적으로여러가지기능을제공하는스크립트를가지고있다. 엔진의태그연산에대한부담을분산시키면서다양한기능을수행할수있다 스크립트기능스크립트는태그값을변경하는기본기능에서부터데이터베이스관리, 레포트기능, 그래픽감시제어등의기능을가지고있다. [ 그림 1.1-1] 시스템빌더에서사용할수있는스크립트 - 메인스크립트 : 엔진이가동중일때실행될수있는스크립트로엔진시작시, 실행중, 종료시로구분되어사용된다. - 조건문스크립트 : 사용자가스크립트실행조건을편집하여조건이만족하면실행문스크립트가실행된다. - 태그값변화스크립트 : 지정한태그값이변화되면스크립트가실행된다. - 라이브러리 : 단독으로실행될수없고다른스크립트에서사용할수있도록작성한서브스크립트이다. - 도면스크립트 : 사용자가제작한그래픽도면이실행될때실행되는스크립트로도면이시작시, 실행중, 종료시로구분되어사용된다. 사용자가작성한모든스크 1-2

18 립트는 EasyView 설치폴더 /Projects/ 프로젝트 /Script 폴더에저장되지만도면스크립트는각각의도면 *.jcg 파일에저장된다. 도면파일은 EasyView 설치폴더 /Projects/ 프로젝트명 /Graphic 폴더에저장된다. - 스크립트테스트 : 사용자가스크립트를작성하면서테스트할수있는기능이다. [ 그림 1.1-2] 그래픽빌더에서사용할수있는스크립트 그래픽빌더에서객체속성을지정할때 누를때 속성에서스크립트를작성할수있다. 누를때스크립트는사용자가객체를누를때실행된다. 1-3

19 1.2 스크립트문법 변수선언변수는 integer 형과 float(double) 형, string 형, time 형을선언할수있다. Integer 형은 dim aa as integer, float 형은 dim bb as float, string 형은 dim ss as string, time 형은 dim tm as time 로선언한다. 변수가선언되면선언된각각의변수값은 0 으로초기화된다. (string 형은빈문자열 ) integer 형은 4byte 의정수, float 형은 8byte 의 double 형을의미한다. 1 값의범위 - integer 형 : 2,147,483,648 ~ 2,147,483,647 - float 형 : 1.7E +/- 308 (15 자리 ) - string 형 : 최대 512 문자 - time 형 : 년, 월, 일, 시간, 분, 초값을가질수있다. time.year 년 time.month 월 time.day 일 time.hour 시 time.minute 분 time.second 초 2 뒤에태그명을적어주면된다. : 태그명 AI_AW1 를참조한다. = 567 : 태그 AI_AW1 에 567 를출력한다. 태그 AI_AW1 가디지털태그이면 1 또는 0 을넣어준다. (1 = ON, 0 = OFF) 만일, 참조한태그가입력태그 (AI, DI, STRING) 이면태그값을바꿔주고, 참조한태그가출력태그 (DO, AO, 입출력겸용 DI, 입출력겸용 AI, STRING) 이면태그의설정된디바이스로출력작업을수행한다. 3 아날로그태그의알람설정값사용 -> hihi 값사용 -> high 값사용 -> low 값사용 -> lolo 값사용 알람값은대입문 (=) 에는사용할수없고참조만할수있다. 1-4

20 예 then hihi 알람이발생했을때 else hihi 알람이발생하지않았을때 endif = 100 사용할수없다. 1-5

21 1) Dim AS 변수와변수의형식을선언한다. 주의 ) Dim 문은사용하는스크립트내에서가장먼저정의되어야한다. Dim varname [AS type] 인자 varname : 변수이름 대소문자구분 type : 변수형식, (Integer, Float, String, Time 중하나 ) 참고변수의형식은동적으로변경할수없다. 모든변수는 DIM 문으로선언후사용해야한다. 예제 Dim a as Integer a = 100 ' a 는정수이며 10 이다. a = 3.14 ' a 는정수이며 3 이다. a = "Hello" ' a 는정수이며 0 이다. Dim a ' 잘못된선언문 Dim a as Integer ' OK Dim a, b as Integer ' OK ( 콤마로구분하여여러변수를동시에선언할수있다.) Dim a, b as Integer; ' OK ( 문장의끝을지정하기위해명시적으로세미콜론을지정할수있다.) 1-6

22 1.2.2 제어문 1) if 문 IF 조건문형식 If 조건문 Then 실행문 [Else else 실행문 ] 또는, If 조건문 Then 실행문 [Else else실행문 ] End If 또는 if 조건문 1 then 실행문1 else if 조건문 2 then 실행문2 else if 조건문 3 then 실행문3 endif; endif; endif; 인자조건문참과거짓을판변하는표현식 실행문, 실행문 해당조건이참일때, 실행되는표현식 else 실행문, else 실행문 해당조건이거짓일때, 실행되는표현식 1-7

23 참고 If a = 0 Then MsgBox "OK" If (a = 0) or (b = 0) Then c = c - 1 Else c = c + 1 Endif If a = 0 Then b = 0 c = 0 Else b = 1 c = 1 End IF If a = 0 Then If b = 0 Then c = 0 Else c = 1 End IF End IF If a = 3 Then MsgBox "3"; Else If a = 2 Then MsgBox "2"; Else If a = 1 Then MsgBox "1"; EndIf; EndIf; EndIf; 1-8

24 예제 Dim x1 As Integer If (x1 = 1) = 1 Then MsgBox "OK"; Else MsgBox "Fail"; End If => MsgBox "Fail" =========================================================== Dim x1 As Integer x1 = 1; If x1 = 1 Then MsgBox "OK"; Else MsgBox "Fail"; End If => MsgBox "OK" =========================================================== Dim x As Integer Dim y As Integer x = 1; y = 1; If x = 1 And y = 1 Then MsgBox "OK"; Else MsgBox "Fail"; End If 1-9

25 => MsgBox "OK" =========================================================== Dim x As Integer Dim y As Integer x = -1; y = 1; If Abs(x) = 1 Then MsgBox "OK"; Else MsgBox "Fail"; End If => MsgBox "OK" ============================================================ Dim upperstring as String; upperstring = "abcd"; If StringMakeUpper(upperString) = "ABCD" Then MsgBox "OK"; Else MsgBox "Fail"; EndIf => MsgBox "OK" ============================================================ Dim upperstring as String; upperstring = "ABCD"; 1-10

26 If StringMakeLower(upperString) = "abcd" Then MsgBox "OK"; Else MsgBox "Fail"; EndIf => MsgBox "OK" ============================================================ Dim x1 As Integer x1 = 1; If x1 Then MsgBox "OK"; Else MsgBox "Fail"; End If => MsgBox "OK" ============================================================ Dim x1 As Integer; x1 = 0; If x1 Then MsgBox "OK"; Else MsgBox "Fail"; End If => MsgBox "Fail" 1-11

27 2) for 반복실행문형식 For counter = start To end [Step step] [ 실행문 ] Next 인자 counter 계수 start 계수의시작값 end 계수의마지막값 step 계수증가값, 지정되지않으면 1 값이다. 실행문 For문내에서의실행문참고 For i = 0 To 10 MsgBox i Next For i = 0 To 15 Step 3.14 MsgBox Next Nested For: For i = 0 To 3 For j = 0 To 4 MsgBox i+j Next Next 1-12

28 3) do 조건이참이거나조건이참이될때까지 DO LOOP 내의구절을반복수행하는 형식 Do [While Until 조건문 ] [ 실행문 ] Loop 또는 Do [ 실행문 ] Loop [While Until 조건문 ] 인자조건문실행문 참과거짓을나타내는표현식 실행문 참고 dim a as integer a = 10; msgbox a do a = a-1; loop while a <> 0 msgbox a 1-13

29 4) while 조건문이참일동안실행되는반복문형식 While 조건문실행문 Wend 인자조건문조건문실행문조건문이참일동안실행되는실행문참고 dim a as integer a = 10; msgbox a While a > 0 a = a - 1 Wend msgbox a 1-14

30 5) goto 지정한 label 로실행스텝을이동한다. 형식 Goto label 참고 dim a as integer a = 10; goto _final a = a-5 _final: msgbox a 1-15

31 6) until Do 루프의실행을종료하는조건을지정한다. Do { While Until } condition [ statements ] [ Exit Do ] [ statements ] Loop -or- Do [ statements ] [ Exit Do ] [ statements ] Loop { While Until } condition 1-16

32 1.2.3 함수 1) sub 서브함수는사용이빈번한을미리서브함수로만들어놓고필요할때마다호출하여사용할수있다. 서브함수의선언은변수선언문 (dim) 이전에선언되어야한다. 형식 Sub name (arglist) 실행문 End Sub 인자 name Sub함수명 arglist 변수리스트, 콤마로구분된다. 실행문실행문참고예제 1 Sub Sub1 (a as integer, b as integer) Dim c as integer c = a+b; msgbox c; End Sub Dim x, y as integer; x = 10; y = 5; Sub1(x+1, y); 예제 2 byref 키워드를이용하여호출함수의인자값을변경할수있다. Sub Sub1 (a as integer, b as integer, byref c as integer) c = a+b; msgbox c; End Sub 1-17

33 Dim x, y, z as integer; x = 10; y = 5; Sub1(x+1, y, z); msgbox z 1-18

34 2) end 스크립트의어디에서든지 end 문을만나면스크립트는즉시종료된다. 참고 dim a as integer; a = 10; If a = 9 Then End; else msgbox a; endif; a = a-5; msgbox a 1-19

35 1.2.4 표준함수 1) modulus 두수를나누고그나머지를반환한다. result = number1 Mod number2 인자없음참고나머지연산자는 number1 을 number2 ( 실수를정수로반올림한 ) 로나누고, 나머지만을 result 에돌려준다. 예를들어다음식에서 A (result) 의값은 5 이다. A = 19 Mod

36 2) pi pi 상수값을반환한다. dim fval as float fval = pi*100 msgbox fval 인자없음참고원주율 : 원의둘레를지름으로나누었을때나타나는일정한수 1-21

37 3) sin sin 값을반환한다. float sin( float x ) 인자 x : 구하고자하는라디안각도참고 예제 dim fval as float fval = sin(4.3) 1-22

38 4) cos cos 값을반환한다. float cos( float x) 인자 x : 구하고자하는라디안각도참고 예제 dim fval as float fval = cos(3.4) 1-23

39 5) tan tan 값을반환한다. float tan( float x) 인자 x : 구하고자하는라디안각도참고 예제 dim fval as float fval = tan(3.4) 1-24

40 6) atan 아크탄젠트값을구한다. float atan( float x) 인자 x : 구하고자하는라디안각도참고 예제 dim fval as float fval = atan(3.4) 1-25

41 7) asin 아크사인값을구한다. float asin( float x) 인자 x : 구하고자하는라디안각도참고 예제 dim fval as float fval = asin(3.4) 1-26

42 8) acos 아크코사인값을구한다. float acos( float x) 인자 x : 구하고자하는라디안각도참고예제 dim fval as float fval = acos(3.4) 1-27

43 9) sqr 제곱근값연산 float sqr( float x) 인자 x : 구하고자하는수참고 예제 dim fval as float fval = sqr(16) 1-28

44 10) hypot 빗변의길이를구한다. float hypot ( float x, float y) 인자 x : 삼각형밑변의길이 y : 삼각형의높이참고 예제 dim fval as float fval = hypot(100, 200) 1-29

45 11) pow 제곱승값을구한다. float pow ( float base, float exp ) 인자 base : 지수 exp : 승수참고 Base 를지수로한 exp 제곱승을구한다. 예제 dim fval as float fval = pow(3,4) fval =

46 12) abs 절대값을구한다. float abs ( float x ) 인자 x : 구하고자하는수참고 예제 dim fval as float fval = abs(-67) fval =

47 13) exp 멱지수를구한다. float exp (float x ) 인자 x : 구하고자하는값참고 예제 dim fval as float fval = exp(100) 1-32

48 14) log 지수로그값을구한다. float log ( float x) 인자 x : 구하고자하는값참고 예제 dim fval as float fval = log(10) 1-33

49 15) log10 자연로그값을구한다. float log10 ( float x) 인자 x : 구하고자하는값참고 예제 dim fval as float fval = log10(100) 1-34

50 16) rand 랜덤값을구한다. int rand ( ) 인자 참고 예제 Dim n As Integer n = rand() 1-35

51 17) Now 현재시스템시간을구한다. Time Now() 인자없음참고 예제 Dim mytime as Time mytime = Now() MsgBox mytime.year; MsgBox mytime.month; MsgBox mytime.day; MsgBox mytime.hour; MsgBox mytime.minute; MsgBox mytime.second; 1-36

52 18) SetTime 시간형변수를초기화하기위한함수 Time SetTime( int yyyy, int mm, int dd, int hh, int mi, int ss) 인자 yyyy : 년도를지정 mm : 월을지정 dd : 일을지정 hh : 시간을지정 mi : 분을지정 ss : 초를지정참고리턴되어지는형식은시간형이다. 예제 Dim mytime as Time mytime = SetTime(2005, 12, 25, 13, 59, 30) mytime 이라는시간형변수를 2005 년 12 월 25 일 13 시 59 분 30 초로설정한다. 1-37

53 19) GetDayOfMonth 해당하는월의날수를반환한다. integer GetDayOfMonth(yyyy, mm) 인자 yyyy : 년도를지정 mm : 월을지정참고리턴되어지는형식은 integer 형이다. 예제 dim nday as integer dim nyear as integer dim nmonth as integer nyear = 2005 nmonth = 2 nday = GetDayOfMonth(nYear, nmonth); nday 는해당하는월의날수를반환한다. 1-38

54 20) GetNextTime 시간형변수를연산하는함수 integer GetNextTime(Time, dd, hh, mi, ss); 인자 dd : 일을지정 hh : 시간을지정 mi : 분을지정 ss : 초를지정참고리턴되어지는형식은 integer 형이다. 예제 dim nret as integer dim tmtime as time tmtime = Now() tmtime.year = 2005; tmtime.month = 9; tmtime.day = 29; tmtime.hour = 23; tmtime.minute = 12; tmtime.second = 13; nret = GetNextTime(tmTime, 4, 1, 2, 3); if nret > 0 then tmtime 은 4 일 1 시간 2 분 3 초를더한값이다. Endif nret = GetNextTime(tmTime, -1, 0, 0, 0); if nret > 0 then tmtime은 1일뺀값이다. endif 1-39

55 21) SetLocalTime 현재시스템의시간을바꾸는함수이다. integer SetLocalTime(Time) 인자 Time : Time 형변수참고리턴되어지는형식은 integer 형이다. 예제 dim ct as time dim nret as integer ct.year = 2005 ct.month = 10 ct.day = 12 ct.hour = 13 ct.minute = 14 ct.second = 15 nret = SetLocalTime(ct) 시스템의현재시간이 2005 년 10 월 12 일 13 시 14 분 15 초로변경된다. 1-40

56 22) GetElapsedTime 시간의차이를구하는함수로두시간사이의차이를초로반환한다. Float GetElapsedTime(Time StartTime, Time EndTime) 인자 StartTime, EndTime 모두 time 형변수임참고예제 Dim fret as float Dim tmstart as Time Dim tmend as Time tmstart.year = 2007; tmstart.month = 6; tmstart.day = 8; tmstart.hour = 0; tmstart.minute = 0; tmstart.second = 0; tmend.year = 2007; tmend.month = 6; tmend.day = 8; tmend.hour = 0; tmend.minute = 1; tmend.second = 0; fret = GetElapsedTime(tmStart, tmend); msgbox fret fret 의값은 60 이다. 1-41

57 23) XOR 두 Boolean 식의배타적논리합을수행하거나두숫자식의배탁적비트연산을수행한다. 예제 Dim a As Integer = 10 Dim b As Integer = 8 Dim c As Integer = 6 Dim firstcheck, secondcheck, thirdcheck As Boolean firstcheck = a > b Xor b > c secondcheck = b > a Xor b > c thirdcheck = b > a Xor c > b 1-42

58 And / Or 두조건을결합한다. 두개이상의논리연산자가사용될경우 And 연산자가먼저계산된다음 or 연산자가계산된다. 괄호를사용하면계산순서를변경할수있다. USE AdventureWorks GO SELECT FirstName, LastName, Shift FROM HumanResources.vEmployeeDepartmentHistory WHERE Department = 'Quality Assurance' AND (Shift = 'Evening' OR Shift = 'Night') 1-43

59 1.2.5 문자열을다루는함수 1) StringLen 문자열의길이를구한다. Integer StringLen(String mystr); 인자 mystr 입력문자열참고문자열의길이를반환한다. 예제 Dim evstr As String; Dim nresult As Integer; evstr = "abcd"+"efgh"; nresult = StringLen(evStr); MsgBox nresult; '8 1-44

60 2) StringRemove 지정문자열에서특정문자를삭제한다. String strafter = StringRemove(String strbefore, String strchar); 인자 strafter 결과로반환되는문자열 strbefore 원본문자열 strchar 특정지정문자참고한글에대해서는오류발생소지가있음. 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = "ABCD EFGH IJK"; AfterStr = StringRemove(BeforeStr, " "); ' 원본문자열에서특정글자즉, 여기서는공백을제거한다. MsgBox AfterStr; 'ABCDEFGHIJK 1-45

61 3) StringReplace 지정문자열에서특정문자열을교체한다. String StringReplace(String strbefore, String strtarget, String strchange); 인자 strbefore strtarget strchange 참고 원본문자열찾기를원하는문자열찾은문자열을교체할문자열 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = "abcd^^efghi^^xxx"; AfterStr = StringReplace(BeforeStr, "^^", "@@@"); 'BeforeStr 에서 로교체 MsgBox AfterStr; 1-46

62 4) StringMid 문자열에서지정한개수의문자를반환한다. String StringMid(String strbefore, integer nstart, integer ncnt); 인자 strbefore 원본문자열 nstart 반환을시작하는문자위치 ncnt 반환할문자개수참고 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = " "; AfterStr = StringMid(BeforeStr, 0, 5); '0 번째부터 5 글자를 AfterStr 에대입 => "01234" MsgBox AfterStr; 1-47

63 5) StringLeft 문자열의왼쪽부터지정한수만큼의문자를반환한다. String StringLeft(String strbefore, integer ncnt); 인자 strbefore 왼쪽끝문자부터반환될문자이다. ncnt 반환할문자개수참고 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = " "; AfterStr = StringLeft(BeforeStr, 7); ' 처음부터 7 개문자를 AfterStr 에대입 => " " MsgBox AfterStr; 1-48

64 6) StringRight 문자열의오른쪽부터지정한수만큼의문자를반환한다. String StringRight(String strbefore, integer ncnt); 인자 strbefore 오른쪽끝문자부터반환될문자이다. ncnt 반환할문자개수참고 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = " "; AfterStr = StringRight(BeforeStr, 5); ' 끝에서부터 5 개문자를 AfterStr 에대입 => "56789" MsgBox AfterStr; 1-49

65 7) StringCompare 두개의문자열을비교한다. integer StringCompare(String strsource, String strtarget); 인자 strsource 비교할문자열 1 strtarget 비교할문자열 2 참고두문자열이같으면 0 을리턴한다. 두문자열이같지않으면 1 또는 -1 을리턴한다. 대소문자구분한다. 예제 Dim BeforeStr As String; Dim BeforeStr2 As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = "abcde"; BeforeStr2 = "abcde"; nresult = StringCompare(BeforeStr, BeforeStr2); MsgBox nresult; 1-50

66 8) StringTrimLeft 문자열의왼쪽에있는공백을삭제한다. String StringTrimLeft(String strbefore); 인자 strbefore 왼쪽공백이삭제되어질문자열참고 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = " abc de"; AfterStr = StringTrimLeft(BeforeStr); ' 문자열의왼쪽공백삭제 => "abc de" MsgBox AfterStr; 1-51

67 9) StringTrimRight 문자열의오른쪽에있는공백을삭제한다. String StringTrimRight(String strbefore); 인자 strbefore 오른쪽공백이삭제되어질문자열참고 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = " abc de "; AfterStr = StringTrimRight(BeforeStr); ' 문자열의오른쪽공백삭제 => " abc de" MsgBox AfterStr; 1-52

68 10) StringMakeUpper 지정문자열을모두대문자로바꾼다. String StringMakeUpper(String strbefore); 인자 strbefore 대문자로바꾸기를원하는문자열참고영문자만바뀐다. 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = "abcd"+"lll"; AfterStr = StringMakeUpper(BeforeStr); ' => "ABCD" MsgBox AfterStr; 1-53

69 11) StringMakeLower 지정문자열을모두소문자로바꾼다. String StringMakeLower(String strbefore) 인자 strbefore 소문자로바꾸기를원하는문자열참고 예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = "ABCDefg"; AfterStr = StringMakeLower(BeforeStr); ' => "abcdefg" MsgBox AfterStr; 1-54

70 12) ToChar 숫자에해당하는 ASCII 문자값을구한다. String ToChar(Integer Int) 인자 Int : 사이의숫자참고 예제 Dim str As String str = ToChar(74)+ToChar(73)+ToChar(83); MsgBox str; JIS 1-55

71 13) Hex 숫자를 Hex 포맷의문자열로변환한다. String Hex(Integer Int) 인자 Int : 변환할숫자참고 예제 Dim StrHex As String dim xx as integer; dim yy as string; StrHex = Hex(65535); MsgBox StrHex xx = 0x320 or 0x001 or 0x1000; yy = Hex(xx); MsgBox "0x"+yy; xx = 1000 MsgBox Hex(xx); 1-56

72 14) MakeNumToString 숫자를지정한포맷의문자열로변환한다. String MakeNumToString(String strformat, float fval); 인자 strformat : 변환할포맷 fval : float 형숫자참고 예제 dim strret as string dim strinput as string dim strformat as string dim nret as integer dim fret as float strret = MakeNumToString("%04d", 4); msgbox strret strret = MakeNumToString("%4.3f", 8.6); msgbox strret 1-57

73 15) MakeStringToInt 문자를 integer 형값으로변환한다. integer MakeStringToInt (String strval); 인자 strval : 변환할문자참고 예제 dim strret as string dim strinput as string dim strformat as string dim nret as integer dim fret as float nret = MakeStringToInt("0004"); msgbox nret 1-58

74 16) MakeStringToFloat 문자를 float 형값으로변환한다. float MakeStringToFloat (String strval); 인자 strval : 변환할문자참고 예제 dim strret as string dim strinput as string dim strformat as string dim nret as integer dim fret as float fret = MakeStringToFloat(" "); msgbox fret 1-59

75 17) BitAnd 비트 And 한결과를반환한다. integer BitAnd (integer nsrc, integer nbit); 인자 nsrc : 비교될값 nbit : 비교할값참고 예제 dim nbitop as integer dim nnodetype as integer dim ntypescada as integer nnodetype = GetEasyViewNodeType() nbitop = BitAnd(nNodeType, ntypescada); if nbitop > 0 = 1 endif 1-60

76 18) BitOr 비트 Or 한결과를반환한다. integer BitOr (integer nsrc, integer nbit); 인자 nsrc : 비교될값 nbit : 비교할값참고 예제 dim nbitop as integer dim nnodetype as integer dim ntypescada as integer nnodetype = GetEasyViewNodeType() nbitop = BitOr(nNodeType, ntypescada); if nbitop > 0 = 1 endif 1-61

77 19) Sprintf 지정한포맷으로문자열값을변환한다. String Sprintf(String strformat, 1, 2, aaa ); 인자 strformat : 변환할문자열포맷참고 예제 dim strret as string dim strformat as string dim n as integer dim f as float dim str as string strformat = %d %.2f %s n = 1 f = 2 str = aaa strret = sprintf(strformat, n, f, str); msgbox strret 1-62

78 1.2.6 Database 관련함수 1) SQLConnect 데이터베이스에접속을시작한다. Integer SQLConnect(Integer ConnectionID, String strconnect); 인자 ConnectionID 지정한연결에사용할 ID 를리턴받을값이다. strconnect ODBC 연결용문자열 참고 ConnectionID 는 DB 에접속을종료할때까지키로사용되어진다. DB 접속이성공하면 0 이상의값을반환하고, 실패하면음수값이반환된다. 접속문자열은 DSN=odbcDSN; UID=szUser; PWD=szPassword 의형식으로구성된다. szuser, szpassword 가없을경우엔 DSN=odbcDSN; UID=; PWD= 와같이입력한다. 예제 SqlSelect 참조 1-63

79 2) SQLDisconnect 연결되어진데이터베이스의접속을해제한다. Integer SQLDisconnect(Integer ConnectionID); 인자 ConnectionID 연결을해제할 DB 접속 ID 참고 ConnectionID 는 SQLConnect 함수에서발생된값이다. 예제 SqlSelect 참조 1-64

80 3) SQLSelect 테이블의데이터를읽어오기위한함수이다. Integer SQLSelect(Integer ConnectionID, String strtable, String strfield, String strwhere, String strorder); 인자 ConnectionID 읽어올테이블이있는 DB 의연결 ID strtable 테이블명문자열 strfield 필드명문자열 strwhere 조건문자열 strorder 정렬순서문자열 [ 참고 ] SQLSelect 함수는내부적으로 Select SQL 문장을만들어테이블에있는데이터를조회한다. 내부적으로 Select 문장을만드는방법은 SELECT strfield FROM strtable [WHERE strwhere] [ORDER BY strorder] 와같이사용되어진다. 예제 Dim nresult As Integer; Dim ConnectionId As Integer; Dim NumRows, NumCols As Integer; Dim strresult(3) As String; nresult = SQLConnect(ConnectionId, "DSN=EvScriptDb; UID=; PWD=;"); if nresult < 0 Then MsgBox "DB 에연결할수없습니다."; End Else MsgBox "DB 연결 OK"; EndIf nresult = SqlSelect(ConnectionId, "sample_db", "*", "", ""); NumRows = SQLNumRows(ConnectionId); MsgBox "selected record count : "+NumRows; NumCols = SQLNumFields(ConnectionId); 1-65

81 nresult = SqlFirst(ConnectionId); While nresult > 0 nresult = SQLGetData(ConnectionId, 0, strresult(0)); nresult = SQLGetData(ConnectionId, 1, strresult(1)); nresult = SQLGetData(ConnectionId, 2, strresult(2)); MsgBox strresult(0)+":"+strresult(1)+":"+strresult(2); nresult = SqlNext(ConnectionId); WEnd nresult = SQLDisconnect(ConnectionId); 예제 1 ============================================================= Dim nresult As Integer; Dim ConnectionId As Integer; Dim NumRows, NumCols As Integer; Dim strresult(3) As String; nresult = SQLConnect(ConnectionId, "DSN=EvScriptDb; UID=; PWD=;"); if nresult < 0 Then MsgBox "DB 에연결할수없습니다."; End Else MsgBox "DB 연결 OK"; EndIf nresult = SqlSelect(ConnectionId, "sample_db", "*", "str > ' '", ""); NumRows = SQLNumRows(ConnectionId); MsgBox "selected record count : "+NumRows; NumCols = SQLNumFields(ConnectionId); nresult = SqlLast(ConnectionId); If nresult > 0 Then 1-66

82 EndIf nresult = SQLGetData(ConnectionId, 0, strresult(0)); nresult = SQLGetData(ConnectionId, 1, strresult(1)); nresult = SQLGetData(ConnectionId, 2, strresult(2)); MsgBox strresult(0)+":"+strresult(1)+":"+strresult(2); nresult = SqlNext(ConnectionId); nresult = SQLDisconnect(ConnectionId); 예제 2 ============================================================== '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'DB 에연결할때 DIM ResultCode AS INTEGER; DIM ConnectionId AS INTEGER; ResultCode = SQLConnect(ConnectionId, "DSN=kos_sam; UID=; PWD=;"); IF ResultCode < 0 THEN MsgBox "DB에연결되지않았습니다. 관리자에게문의바랍니다."; ELSE QFSetEQCodeSetting(); = = 0; ENDIF; ResultCode = SQLDisconnect(ConnectionId); '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 1-67

83 'DB 에서레코드를가져올때 SUB QFDetail(Dim MCode AS STRING) 'MCode : S1_TMS_A82205 DIM Zone_Seq AS String; 'MCode SubString Zone별 Sequence Number DIM Chamber_A AS String; DIM Chamber_B AS String; DIM Chamber_C AS String; DIM Chamber_Seq AS String; 'MCode SubString Chamber Sequence Number DIM StrLen AS INTEGER; 'SerialNumber의 length값 DIM irows AS INTEGER; 'RowCount변수 DIM mmodel AS String; 'Model명변수 <Parameter로사용 > DIM mmaker AS String; 'MAKER명변수 <Parameter로사용 > DIM meqpid AS String; 'EQCode명변수 <Parameter로사용 > DIM mtype AS String; 'TYPE명변수 <Parameter로사용 > DIM mch1 AS String; 'Ch1명변수 <Parameter로사용 > DIM mch2 AS String; 'Ch2명변수 <Parameter로사용 > DIM mch3 AS String; 'Ch3명변수 <Parameter로사용 > DIM mch4 AS String; 'Ch4명변수 <Parameter로사용 > DIM dmodel AS String; 'MODEL명변수 <Parameter로사용 > DIM ResultCode AS INTEGER; DIM ConnectionId AS INTEGER; DIM Channel_Cnt AS INTEGER; QFInitialize(); 'ex) Get Prameter : S1_TMS_A81001 Chamber_A = ""; Chamber_B = ""; Chamber_C = ""; MCode = StringRemove(MCode, "@"); Zone_Seq = MCode; 'ex) Zone_Seq = S1_TMS_A

84 : SerialNumber 의 Tag I/O Message = MCode + "_1_L134"; 'ex) IM_SerialNumber = S1_TMS_A81001_1_L134 'Reconnec ResultCode = SQLConnect(ConnectionId, "DSN=kos_sam; UID=; PWD=;"); 'DB Connect 를위한부분으로해당태그의 Seqence(A001) 를 ProdID 값과일치하면 'ProdID/ PRODCODE/ Maker/ Model/ ZONE/ BAY 를읽어온다. 'SQL Transact 'ResultCode = SQLTransact(ConnectionId); 'Exception 발생하여부득히 SQL Query 문을 2 개로만든다. 'Exception 설비 : UNISEM PCS8000A( Heat Exchange) + PCS5000B(O3Zen/Chiller) 를하나로하는장비들 'Exception 설비들은 Zone_Seq + Chamber_Seq 로검색한다. ResultCode = SQLSelect(ConnectionId, "TMS13_PRODINFO", "*", "PRODID = '" + Zone_Seq + "'", "PRODID" ); 'ex> SQL Query : SELECT * FROM TMS13_PRODINFO WHERE PRODID = Zone_Seq AND CHBA = Chamber_Seq 'ex> SQL Query : SELECT * FROM TMS13_PRODINFO WHERE PRODID = Zone_Seq 'Chamber_Seq = StringMid(MCode, 5, 1) ' 챔버순서값 'ex) Chamber_Seq = A ' DB에서읽은 Maker값을 mmaker변수에저장 IF ResultCode > 0 THEN ResultCode = SQLLast(ConnectionId); 1-69

85 irows = SQLNumRows(ConnectionId); IF irows > 0 THEN ResultCode = SQLFirst(ConnectionId); 'DB에서조건에맞는데이터를읽어변수에저장 ResultCode = SQLGetData(ConnectionId, 2, mmaker); ResultCode = SQLGetData(ConnectionId, 3, dmodel); ResultCode = SQLGetData(ConnectionId, 7, mtype); ResultCode = SQLGetData(ConnectionId, 8, meqpid); ResultCode = SQLGetData(ConnectionId, 9, Chamber_A); ResultCode = SQLGetData(ConnectionId, 10, Chamber_B); ResultCode = SQLGetData(ConnectionId, 11, Chamber_C); ResultCode = SQLGetData(ConnectionId, 12, mch1); ResultCode = SQLGetData(ConnectionId, 13, mch2); ResultCode = SQLGetData(ConnectionId, 14, mch3); ResultCode = SQLGetData(ConnectionId, 15, mch4); 'Maker에행당되는 Model 을 DB 에서읽는다. IF mmaker = "FST" THEN 'FSCS-CD352 => CD352 테이블상의 Model 명과 Window 명의차이에따른 Substring mmodel = StringMid(dModel, 5, StringLen(dModel)); ELSE IF mmaker = "UNISEM" THEN mmodel = dmodel; ELSE IF mmaker = "THC" THEN 'TK-TH12T4 => TH12T4 테이블상의 Model 명과 Window 명의차이에따른 Substring mmodel = StringMid(dModel, 3, StringLen(dModel)); ENDIF; ENDIF; ENDIF; ' 채널타입에맞는채널명을얻기위한조건문 IF mtype = "SINGLE" = mch1; Channel_Cnt = 1; ENDIF; 1-70

86 IF Chamber_A <> "X" THEN Chamber_Seq = Chamber_A; ELSE IF Chamber_B <> "X" THEN Chamber_Seq = Chamber_B; ELSE IF Chamber_C <> "X" THEN Chamber_Seq = Chamber_C; ENDIF; ENDIF; ENDIF; IF mtype = "DUAL" THEN IF mmodel = "PCD4000A" AND Chamber_Seq = "B" = = mch4; = = mch2; ENDIF; Channel_Cnt = 2; ENDIF; IF mtype = "THREE" = = = mch3; Channel_Cnt = 3; ENDIF; 'Channel에맞는태그생성 QuickFunction호출 QFDetailChannel(MCode, Channel_Cnt); ' 이전 PopUp 화면삭제 'IF SM_PrevDetailPopScreen <> "" THEN ' Hide SM_PrevDetailPopScreen; 'ENDIF; 'Open 하기위한화면에대한정의 POPUPPAGE("main.jcg", "Detail-" + mmaker + "(" + mmodel + ").jcg", 1, 1-71

87 358, 43) 'ShowTopLeftAt("Detail-" + mmaker + "(" + mmodel + ")", 360, 70 ); 'SM_PrevDetailPopScreen = "Detail-" + mmaker + "(" + mmodel + ")"; ResultCode = SQLDisconnect(ConnectionId); 'Open 하기위한 Trend 화면을호출하기위한 QuickFunction 호출 QFDetailTrend(MCode); ELSE MsgBox " 현재위치에해당되는데이터가존재하지않습니다. 관리자에게문의바랍니다."; ENDIF; ELSE MsgBox " 현재위치에해당되는데이터가존재하지않습니다. 관리자에게문의바랍니다."; ENDIF; END SUB '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'DB 에서레코드를가져올때 SUB QFDetailTrend(Dim MCode AS STRING) DIM ResultCode AS INTEGER; DIM ConnectionId AS INTEGER; DIM Zone_Seq AS String; 'MCode SubString Zone별 Sequence Number DIM EQPID_SUB AS String; 'EQPID SubString ETCH-TEL 에대해 ±8 로도 TREND 를보여주기위한구분변수 DIM Chamber_A AS String; 'MCode SubString Chamber Sequence Number DIM Chamber_B AS String; 'MCode SubString Chamber Sequence Number DIM Chamber_C AS String; 'MCode SubString Chamber Sequence Number DIM irows AS INTEGER; 'RowCount변수 1-72

88 DIM Channel_Chk AS String; 'Channel Count <Parameter로사용 > DIM mprodcode AS String; 'Prodcode <Parameter로사용 > DIM mmodel AS String; 'Model명변수 <Parameter로사용 > DIM mmaker AS String; 'MAKER명변수 <Parameter로사용 > DIM marea AS String; 'Area명변수 <Parameter로사용 > DIM meqpid AS String; 'EQCode명변수 <Parameter로사용 > DIM mmainpd AS String; 'MAINPD명변수 <Parameter로사용 > DIM mtype AS String; 'TYPE명변수 <Parameter로사용 > DIM mbay AS String; 'Bay명변수 <Parameter로사용 > DIM mch1 AS String; 'Ch1명변수 <Parameter로사용 > DIM mch2 AS String; 'Ch2명변수 <Parameter로사용 > DIM mch3 AS String; 'Ch3명변수 <Parameter로사용 = = = = = = = = = = = = = = = ""; Channel_Chk = = 0; 'Trend 에보여지는 PV-SV 차값 Channel1 ( 온도 = 0; 'Trend 에보여지는 PV-SV 차값 Channel2 ( 온도 = 0; 'Trend 에보여지는 PV-SV 차값 Channel3 ( 온도 ) 1-73

89 @MHV1 = 0; 'Trend 에보여지는 PV-SV 차값 Channel1 ( 습도 ) MCode = StringRemove(MCode, "@"); 'DB Reconntect ResultCode = SQLConnect(ConnectionId, "DSN=kos_sam; UID=; PWD=;"); 'MCode : S1_TMS_A82205 '@DB Connect 를위한부분으로해당태그의 Seqence(A001_A) 를 PRODID 값과일치하면 'EQPID / PRODCODE/ Maker/ Model/ ZONE/ BAY 를읽어온다. Zone_Seq = MCode; ' 칠러순차코드값 'SQL Transact 'ResultCode = SQLTransact(ConnectionId); 'Select Query ResultCode = SQLSelect(ConnectionId, "TMS13_PRODINFO", "*", "PRODID = '" + Zone_Seq + "'", "PRODID"); IF ResultCode > 0 THEN ResultCode = SQLFirst(ConnectionId); 'DB에서조건에맞는데이터를읽어변수에저장 ResultCode = SQLGetData(ConnectionId, 1, mprodcode); ResultCode = SQLGetData(ConnectionId, 2, mmaker); ResultCode = SQLGetData(ConnectionId, 3, mmodel); ResultCode = SQLGetData(ConnectionId, 4, marea); ResultCode = SQLGetData(ConnectionId, 5, mbay); ResultCode = SQLGetData(ConnectionId, 6, mmainpd); ResultCode = SQLGetData(ConnectionId, 7, mtype); ResultCode = SQLGetData(ConnectionId, 8, meqpid); ResultCode = SQLGetData(ConnectionId, 9, Chamber_A); ResultCode = SQLGetData(ConnectionId, 10, Chamber_B); 1-74

90 ResultCode = SQLGetData(ConnectionId, 11, = mprodcode; ' = meqpid; ' = marea; = mbay; = mmainpd; ' = mmaker; = mmodel; 'MODEL IF Chamber_A = "A" = Chamber_A; ENDIF; IF Chamber_B = "B" = Chamber_B; ENDIF; IF Chamber_C = "C" = Chamber_C; = mtype; 'TYPE = "SINGLE" THEN Channel_Chk = "100"; ENDIF; = "DUAL" THEN Channel_Chk = "200"; ENDIF; = "THREE" THEN Channel_Chk = "300"; ENDIF; ' Channel Count를 PLC Address 에서가져온다. = "SINGLE" THEN = "THC" = MCode + "_1_L113"; 'PV = MCode + "_1_L127"; ' <- 수정전 : L115 : SV = MCode + "_1_L114"; 'PV = MCode + "_1_L128"; 'SV Humidity = MCode + = MCode + "_1_L120"; ENDIF; ELSE = "DUAL" = MCode + = MCode + "_1_L120"; 1-75

91 @IA_Ch2_Process113 = MCode + = MCode + "_2_L120"; ELSE = "THREE" = Zone_Seq + = Zone_Seq + = Zone_Seq + = Zone_Seq + = Zone_Seq + = Zone_Seq + "_1_L120"; ELSE MsgBox "PLC Address 에서 Channel 값이올라오지않습니다. 관리자에게문의바랍니다." ENDIF; ENDIF; ENDIF; 'Channel Count Receive End ' 이전 PopUp 화면삭제 'IF SM_PrevPopScreen <> "" THEN Hide SM_PrevPopScreen; ENDIF; 'Open할화면에대한정의 EQPID_SUB = StringMid(@MM_EQPID, 1, 4); 'EQPID SUBSTRING = "THC" THEN POPUPPAGE("main.jcg","Detail-Trend100(THC).jcg",1,0,43) ELSE IF EQPID_SUB = "ETOE" THEN 'TEL(ETCH) 에관련된 TREND 는 ±8 차이 로한다. POPUPPAGE("main.jcg","Detail-Trend" + Channel_Chk + "(TEL- ETCH).jcg",1,0,43) ELSE POPUPPAGE("main.jcg","Detail-Trend" + Channel_Chk + ".jcg",1,0,43) ENDIF; ENDIF; ResultCode = SQLDisconnect(ConnectionId); ELSE 1-76

92 MsgBox "DB 에서해당데이터를찾을수없습니다. 관리자에게문의바랍니다."; ENDIF; END SUB ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' DIM ResultCode AS INTEGER; DIM ConnectionId AS INTEGER; Dim nlen As Integer; Dim xpos As Integer; Dim ypos As Integer; Dim slen As String; Dim sgas As String; Dim slay As String; Dim styp As String; Dim smfd As String; Dim sinv As String; Dim xposs As string; Dim yposs As string; dim V_CODE as string dim V_INVISIBLE as string dim V_PNAME as string dim RecvString As String dim RecvJcg As String RecvString = "L14GAS010103" 'Dim sarm As String;'Later 알람리스트 Option 줄때사용하려고한다. slen = V_INVISIBLE; nlen = StringLen(sLen); 1-77

93 'if nlen > 0 then ' SetDiValue(@V_INVISIBLE, 0.0); 'End if 'DB 에서 RecvString 에의한조건문으로 Data 를찾는다. '(Gas&Code, Proto Tag, Popup Page(MFD), Popup Page(Layout), Invisible Tag, Alarm Fucntion) ResultCode = SQLConnect(ConnectionId, "DSN=L14GMS; UID=; PWD=;"); IF ResultCode < 0 THEN MsgBox "DB에연결되지않았습니다. 관리자에게문의바랍니다."; ENDIF; 'ResultCode = SQLSelect(ConnectionId, "L14_GMS_INFO", "GASCODE,S_LAY,TYPE,CHG_JCG,HIDE_TAG,X_POS,Y_POS", "TAG = '" + RecvString + "'", "tag"); ResultCode = SQLSelect(ConnectionId, "L14_GMS_INFO", "GASCODE,S_LAY,TYPE,CHG_JCG,HIDE_TAG,X_POS,Y_POS", "TAG = '" + RecvString + "'", "tag"); ResultCode = SQLGetData(ConnectionId, 0, sgas); ResultCode = SQLGetData(ConnectionId, 1, slay); ResultCode = SQLGetData(ConnectionId, 2, styp); ResultCode = SQLGetData(ConnectionId, 3, smfd); ResultCode = SQLGetData(ConnectionId, 4, sinv); ResultCode = SQLGetData(ConnectionId, 5, xposs); ResultCode = SQLGetData(ConnectionId, 6, yposs); xpos = xposs ypos = yposs V_CODE = sgas; V_INVISIBLE = sinv; V_PNAME = sinv; 1-78

94 msgbox sgas msgbox xpos msgbox ypos 1.0); 'PopupProtoPage(RecvJcg,sMfd,RecvString,1,0,0,0,0); 'PopupPage(RecvJcg, slay,1,xpos,ypos); ResultCode = SQLDisconnect(ConnectionId); ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Dim nresult As Integer; Dim ConnectionId As Integer; Dim NumRows, NumCols As Integer; Dim strresult(3) As String; nresult = SQLConnect(ConnectionId, "DSN=EvScriptDb; UID=; PWD=;"); if nresult < 0 Then MsgBox "DB 에연결할수없습니다."; End Else MsgBox "DB 연결 OK"; EndIf nresult = SqlSelect(ConnectionId, "sample_db", "*", "", ""); NumRows = SQLNumRows(ConnectionId); MsgBox "selected record count : "+NumRows; NumCols = SQLNumFields(ConnectionId); nresult = SqlFirst(ConnectionId); While nresult > 0 nresult = SQLGetData(ConnectionId, 0, strresult(0)); nresult = SQLGetData(ConnectionId, 1, strresult(1)); nresult = SQLGetData(ConnectionId, 2, strresult(2)); 1-79

95 WEnd MsgBox strresult(0)+":"+strresult(1)+":"+strresult(2); nresult = SqlNext(ConnectionId); nresult = SQLDisconnect(ConnectionId); ============================================================== Dim nresult As Integer; Dim ConnectionId As Integer; Dim NumRows, NumCols As Integer; Dim strresult(3) As String; nresult = SQLConnect(ConnectionId, "DSN=EvScriptDb; UID=; PWD=;"); if nresult < 0 Then MsgBox "DB 에연결할수없습니다."; End Else MsgBox "DB 연결 OK"; EndIf nresult = SqlSelect(ConnectionId, "sample_db", "*", "str > ' '", ""); NumRows = SQLNumRows(ConnectionId); MsgBox "selected record count : "+NumRows; NumCols = SQLNumFields(ConnectionId); nresult = SqlLast(ConnectionId); If nresult > 0 Then nresult = SQLGetData(ConnectionId, 0, strresult(0)); nresult = SQLGetData(ConnectionId, 1, strresult(1)); nresult = SQLGetData(ConnectionId, 2, strresult(2)); MsgBox strresult(0)+":"+strresult(1)+":"+strresult(2); nresult = SqlNext(ConnectionId); EndIf 1-80

96 nresult = SQLDisconnect(ConnectionId); ============================================================== Dim nresult As Integer; Dim ConnectionId As Integer; Dim NumRows, NumCols As Integer; Dim strquery As String; nresult = SQLConnect(ConnectionId, "DSN=EvScriptDb; UID=; PWD=;"); if nresult < 0 Then MsgBox "DB 에연결할수없습니다."; End Else MsgBox "DB 연결 OK"; EndIf strquery = "Insert Into Sample_db(str, intval, fltval) values(' ', 6, 7.7)"; nresult = SqlExecute(ConnectionId, strquery); if nresult > 0 Then Msgbox " 삽입성공 "; else Msgbox " 삽입실패 "; endif nresult = SQLDisconnect(ConnectionId); ============================================================== dim nret as integer nret = RegisterOdbcDataSource("EV_Fms", "EV_Fms", " ", "YIJS", 1-81

97 "SQL Server") nret = RegisterOdbcDataSource("EV_Fms", "EV_Fms", " ", "YIJS", "SQL Server;DBMSSOCN") if nret < 0 then msgbox "fail" endif ============================================================== 1-82

98 4) SQLNumRows SQLSelect 에의하여반환된데이터의열개수를구한다. Integer SQLNumRows(Integer ConnectionID); 인자 ConnectionID DB 의연결 ID. SQLConnect() 에의하여구한다. 참고반드시 SQLSelect 실행이후에사용되어져야한다. 예제 SQLSelect 참조 1-83

99 5) SQLNumFields SQLSelect 에의하여반환된데이터의필드개수를구한다. Integer SQLNumFields(Integer ConnectionID); 인자 ConnectionID DB 의연결 ID. SQLConnect() 에의하여구한다. 참고반드시 SQLSelect 실행이후에사용되어져야한다. 예제 SQLSelect 참조 1-84

100 6) SQLFirst SQLSelect 에의하여반환된데이터의맨처음으로이동한다. Integer SQLFirst(ConnectionID); 인자 ConnectionID DB 의연결 ID. SQLConnect() 에의하여구한다. 참고반드시 SQLSelect 실행이후에사용되어져야한다. 예제 SQLSelect 참조 1-85

101 7) SQLNext SQLSelect 에의하여반환된데이터의현재커서위치의다음으로이동한다. Integer SQLNext(ConnectionID); 인자 ConnectionID DB 의연결 ID. SQLConnect() 에의하여구한다. 참고반드시 SQLSelect 실행이후에사용되어져야한다. 예제 SQLSelect 참조 1-86

102 8) SQLLast SQLSelect 에의하여반환된데이터의맨끝으로이동한다. Integer SQLLast(ConnectionID); 인자 ConnectionID DB 의연결 ID. SQLConnect() 에의하여구한다. 참고반드시 SQLSelect 실행이후에사용되어져야한다. 예제 SQLSelect 참조 1-87

103 9) SQLPrev SQLSelect 에의하여반환된데이터의현재커서위치의이전으로이동한다. Integer SQLPrev(ConnectionID); 인자 ConnectionID DB 의연결 ID. SQLConnect() 에의하여구한다. 참고반드시 SQLSelect 실행이후에사용되어져야한다. 예제 SQLSelect 참조 1-88

104 10) SQLGetData SQLSelect 에의하여반환된데이터의현재커서위치의지정데이터를구한다. Integer SQLGetData(Integer ConnectionID, Integer FieldPos, String strdata); 인자 ConnectionID DB 의연결 ID. SQLConnect() 에의하여구한다. FieldPos 얻고자하는데이터의필드번호 strdata 값이입력되어질문자열공간참고 FieldPos 는 0 번부터시작한다. 예제 SQLSelect 참조 1-89

105 11) SQLExecute 연결되어진 DB 에직접 SQL 문장을실행한다. Integer SQLExecute(Integer ConnectionID, String strquery); 인자 ConnectionID DB 의연결 ID. SQLConnect() 에의하여구한다. strquery 실행할쿼리문장참고 예제 Dim nresult As Integer; Dim ConnectionId As Integer; Dim NumRows, NumCols As Integer; Dim strquery As String; nresult = SQLConnect(ConnectionId, "DSN=EvScriptDb; UID=; PWD=;"); if nresult < 0 Then MsgBox "DB 에연결할수없습니다."; End Else MsgBox "DB 연결 OK"; EndIf strquery = "Insert Into Sample_db(str, intval, fltval) values(' ', 6, 7.7)"; nresult = SqlExecute(ConnectionId, strquery); if nresult > 0 Then Msgbox " 삽입성공 "; else Msgbox " 삽입실패 "; endif nresult = SQLDisconnect(ConnectionId); 1-90

106 12) RegisterOdbcDataSource 시스템의 ODBC 등록정보에 DSN 항목을입력한다. Integer RegisterOdbcDataSource(String strdsn, String strdesc, String strserver, String strdatabase, String strdatabasetype) 인자 strdsn : 등록될 Domain Name Service 명 strdesc : DSN 설명 strserver : 서버명 ( 또는 ComputerName ) strdatabase : 기본데이터베이스명 strdatabasetype : 데이터베이스종류 "SQL Server", Microsoft Access Driver (*.mdb) Microsoft ODBC for Oracle 참고 DSN 항목이이미입력되어있으면리턴한다. 예제 dim nret as integer nret = RegisterOdbcDataSource("EV_Fms", "EV_Fms", " ", "YIJS", "SQL Server") Network Libraries 에서 TCP/IP 를사용할경우에는데이터베이스종류에다음과같이추가하면된다. nret = RegisterOdbcDataSource("EV_Fms", "EV_Fms", " ", "YIJS", "SQL Server;DBMSSOCN") [ 그림 1.2-1] Add Network Libray Configuration 1-91

107 13) SQLTRANSACT SQL server 데이터베이스에만들어질 Transact_SQL 트랜잭션을나타낸다. 이클래스는상속될수없다. Public ref class SqlTransaction sealed : Public DbTransaction 1-92

108 1.2.7 태그관련 ( 입출력 ) 함수스크립트에서태그값을출력할때에디지털입력태그, 아날로그입력태그, 스트링입력태그는 assign 문을사용하여바로출력할수있지만디지털출력태그, 아날로그출력태그는출력할노드를구성하여로컬시스템또는리모트시스템에네트워크통신을이용하여출력할수있다. - 디지털입력태그, 아날로그입력태그, = = = = = abcd 1 디지털출력태그, 아날로그출력 - 출력할노드를설정해야한다. 노드명작성규칙은다음과같다. - 노드명 : 출력할노드명을지정한다. 노드명을시스템빌더의네트워크노드설정에서미리설정하여둔다. 노드명은로컬노드이거나네트워크노드일수있다. - 프로젝트명 : 출력하려는프로젝트명을설정한다. - DEVICE 명 : EasyView 에서는출력을실행하면현재구동중인 I/O 디바이스가출력을실행한다. EasyView 에서의스테이션은태그를관리하는그룹단위를의미한다. [ 그림 1.2-2] 네트워크노드설정 1-93

109 [ 그림 1.2-3] I/O DEVICE 명 1-94

110 1) OutputDo 디지털태그에출력을내보낸다. Integer OutputDo(String strnode, String strtag, Integer OutValue); 인자 strnode 노드명. 프로젝트명.DEVICE 명 strtag 태그명 OutVal 출력값참고 예제 Dim nresult As Integer nresult = OutputDo("IOSVR.MYPRJ.DEVICE1", "DO_1", 1); 'on 출력 nresult = OutputDo("IOSVR.MYPRJ.DEVICE1", "@DO_1", 1); 'on 출력 nresult = OutputDo("IOSVR.MYPRJ.DEVICE1", "DO_1", 0); 'off 출력 nresult = OutputDo("IOSVR.MYPRJ.DEVICE1", "@DO_1", 0); 'off 출력 1-95

111 2) OutputDi 입출력겸용태그에만사용할수있는함수. 디지털태그로출력을내보낸다. Integer OutputDi(String strnode, String strtag, Integer OutValue); 인자 strnode 노드명. 프로젝트명.DEVICE 명 strtag 태그명 OutVal 출력값참고태그의출력주소가비어있으면출력할노드의버퍼에데이터를출력한다. 예제 Dim nresult As Integer nresult = OutputDi("IOSVR.MYPRJ.DEVICE1", "DI_1", 1); 'on 출력 ( 입출력겸용태그일때만가능, Latch ON) nresult = OutputDi("IOSVR.MYPRJ.DEVICE1", "@DI_1", 0); 'off 출력 ( 입출력겸용태그일때만가능, Latch OFF) 1-96

112 3) OutputAo 아나로그태그로출력을내보낸다. Integer OutputAo(String strnode, String strtag, Integer ntype, Float fval); 인자 strnode 노드명. 프로젝트명.DEVICE 명 strtag 태그명 ntype 출력형식 : [0:EngValue] [1:AdValue] fval 출력값참고 EngValue : 사용자값으로변환하기전, 하부장치로부터입력받은값 AdValue : 사용자가보기용이한값으로변환한값예제 Dim nresult As Integer nresult = OutputAo("IOSVR.MYPRJ.DEVICE1", "AO_1", 0, 50); ' eng 값으로출력 nresult = OutputAo("IOSVR.MYPRJ.DEVICE1", "@AO_1", 0, 50); ' eng 값으로출력 nresult = OutputAo("IOSVR.MYPRJ.DEVICE1", "AO_1", 1, 50); ' ad 값으로출력 ( 여기서 50 은 eng 값 ) nresult = OutputAo("IOSVR.MYPRJ.DEVICE1", "@AO_1", 1, 50); ' ad 값으로출력 ( 여기서 50 은 eng 값 ) 1-97

113 4) OutputAi 입출력겸용태그에서만사용할수있는함수. 아나로그태그로출력을내보낸다. Integer OutputAi(String strnode, String strtag, Integer ntype, Float fval); 인자 strnode 노드명. 프로젝트명.DEVICE 명 strtag 아나로그입력태그명 ntype 출력형식 : [0:EngValue] [1:AdValue] fval 출력값참고 EngValue : 사용자값으로변환하기전, 하부장치로부터입력받은값 AdValue : 사용자가보기용이한값으로변환한값 태그의출력주소가비어있으면출력할노드의버퍼에데이터를출력한다. 예제 Dim nresult As Integer nresult = OutputAi("IOSVR.MYPRJ.DEVICE1", "AI_1", 0, 50); ' eng 값으로출력 nresult = OutputAi("IOSVR.MYPRJ.DEVICE1", "@AI_1", 0, 50); ' eng 값으로출력 nresult = OutputAi("IOSVR.MYPRJ.DEVICE1", "AI_1", 1, 50); ' ad 값으로출력 ( 여기서 50 은 eng 값 ) nresult = OutputAi("IOSVR.MYPRJ.DEVICE1", "@AI_1", 1, 50); ' ad 값으로출력 ( 여기서 50 은 eng 값 ) 1-98

114 5) OutputSi 입출력겸용태그에서만사용할수있는함수. 아나로그태그로출력을내보낸다. Integer OutputSi(String strnode, String strtag, String sval, 0); 인자 strnode 노드명. 프로젝트명.DEVICE 명 strtag 아나로그입력태그명 sval 출력문자참고태그의출력주소가비어있으면출력할노드의버퍼에데이터를출력한다. 예제 Dim nresult As Integer nresult = OutputSi("IOSVR.MYPRJ.DEVICE1", "SI_1", abc, 0); 1-99

115 6) OutputBlock 버퍼블록을출력한다. 문자열태그를출력한다. Integer OutputBlock(String strnode, String strtag); 인자 strnode 노드명. 프로젝트명.DEVICE 명 strtag 문자열태그명참고문자열태그의크기에해당하는길이를출력한다. = "ABCD"; nresult = OutputBlock("IOSVR.MYPRJ.DEVICE1", "STR_1"); ' block 출력 nresult = OutputBlock("IOSVR.MYPRJ.DEVICE1", "@STR_1"); ' block 출력 Dim nresult As = "1234"; nresult = OutputBlock("IOSVR.MYPRJ.DEVICE1", "@S1_GMS_010101_BCYLNO"); ==================================================== Dim nresult As Integer; Dim strtag As = = = -50; Sleep(300); strtag = "V_B_CNF_OUTPUT_01"; nresult = outputblock("iosvr.gms.gas14.plc1", strtag); 1-100

116 7) SetDiValue 디지털태그에값을입력한다. Integer SetDiValue(String strtag, Integer nval); 인자 strtag 디지털태그이름 nval 입력값참고 예제 Dim nresult As Integer nresult = SetDiValue("S1_GMS_010101_AGA", 1); 1-101

117 8) SetAiValue 아나로그태그에값을입력한다. Integer SetAiValue(String strtag, Float fval); 인자 strtag 아나로그태그이름 fval 입력값참고 예제 Dim nresult As Integer nresult = SetAiValue("V_DAY", 1, 4433); // BCD Writing nresult = SetAiValue("V_DAY", 0, 4411); // general writing 1-102

118 9) SetStrValue 문자열태그에값을입력한다. Integer SetStrValue(String strtag, String strval); 인자 strtag 문자열태그이름 strval 입력값참고 예제 Dim nresult As Integer nresult = SetStrValue("S1_GMS_010101_AGA", "0x100000"); 1-103

119 10) GetAiValue 아날로그입력태그의값을반환한다. float GetAiValue(String strtag); 인자 strtag 문자열태그이름참고 예제 Dim fval As float fval = GetAiValue("S1_GMS_010101_AGA"); 1-104

120 11) GetDiValue 디지털입력태그의값을반환한다. float GetDiValue(String strtag); 인자 strtag 문자열태그이름참고 예제 Dim fval As float fval = GetDiValue("S1_GMS_010101_AGA"); 1-105

121 12) SetTagProperty 태그설정을변경한다. nresult SetTagProperty(Integer tagtype, string tagname, integer nmode, string decs); 인자 tagtype 태그타입 tagname 태그이름 nmode Property설정참고 'tagtype = EV_TYPE_DIGITAL_INPUT -> 1 'tagtype = EV_TYPE_DIGITAL_OUTPUT -> 2 'tagtype = EV_TYPE_ANALOG_INPUT -> 3 'tagtype = EV_TYPE_ANALOG_OUTPUT -> 4 'tagtype = EV_TYPE_STRING_INPUT -> 5 'nmode = 1 : // desc 'nmode = 2 : // on message 'nmode = 3 : // off message 'nmode = 4 : // output addr1 'nmode = 5 : // output addr2 'nmode = 6 : // eng-min 'nmode = 7 : // eng-max 'nmode = 8 : // ad-min 'nmode = 9 : // ad-max 'nmode = 10 : // hihi 'nmode = 11 : // high 'nmode = 12 : // low 'nmode = 13 : // lolo 예제 Dim nresult As Integer nresult = SetTagProperty(3, "R_UIMR", 1, " 태그설명변경 "); 1-106

122 13) GetAiADValue 아날로그 INPUT 태그의 AD Value 를읽어온다. GetAiADValue(str strtag, float ncnt); 인자 strtag 문자열태그이름 ncnt 읽어올 DATA 자릿수참고 예제 Dim fval As float fval = GetAiADValue("S1_GMS_010101_AGA", 7.5); 1-107

123 14) GetAoADValue 아날로그 OUTPUT 태그의 AD Value 를읽어온다. GetAoADValue(str strtag, float ncnt); 인자 strtag 문자열태그이름 ncnt 읽어올 DATA 자릿수참고 예제 Dim fval As float fval = GetAoADValue("S1_GMS_010101_AGA", 7.5); 1-108

124 1.2.8 파일과디렉토리함수 1) GetPrivateProfileString INI 파일의내용을읽는다. Section 명 Key 명 [ 그림 1.2-4] EasyView. INI 파일내용 String GetPrivateProfileString(String Section, String Key, String DefaultString, String IniFileName) 인자 Section : Section Name Key : Key Name DefaultString : 파일에서정보를읽지못했을때반환할문자 IniFileName : Section 과 Key 를참조할 Ini 파일경로참고 예제 Dim str As String str = GetPrivateProfileString("Cache", "VALUE", "NONE", "C: Sample.ini"); MsgBox str 1-109

125 2) WritePrivateProfileString INI 파일에내용을쓴다. WritePrivateProfileString(String Section, String Key, String strstring, String IniFileName) 인자 Section : Section Name Key : Key Name strstring : String 문자열 IniFileName : Section 과 Key 를참조할 Ini 파일경로참고 예제 WritePrivateProfileString("Cache", "VALUE", "abcd", "C: Sample.ini"); sub ReadRtuImgAutoTime(dim strrtu as string, Byref nuse as integer, Byref nday as integer, Byref nhour as integer, Byref nminute as integer) dim strinstallpath as string dim strfilename as string dim strval as string dim strapp as string dim strkey as string strinstallpath = GetInstallPath(); strfilename = strinstallpath + "/Bin/RtuImg.ini" strapp = "RTU_INFO_" + strrtu nuse = GetPrivateProfileString(strApp, "Use", "", strfilename) nday = GetPrivateProfileString(strApp, "Day", "", strfilename) nhour = GetPrivateProfileString(strApp, "Hour", "", strfilename) nminute = GetPrivateProfileString(strApp, "Minute", "", strfilename) 1-110

126 end sub sub WriteRtuImgAutoTime(dim strrtu as string, dim nuse as integer, dim nday as integer, dim nhour as integer, dim nminute as integer) dim strinstallpath as string dim strfilename as string dim strapp as string dim strval as string strinstallpath = GetInstallPath(); strfilename = strinstallpath + "/Bin/RtuImg.ini" strapp = "RTU_INFO_" + strrtu strval = nuse WritePrivateProfileString(strApp, "Use", strval, strfilename) strval = nday WritePrivateProfileString(strApp, "Day", strval, strfilename) strval = nhour WritePrivateProfileString(strApp, "Hour", strval, strfilename) strval = nminute WritePrivateProfileString(strApp, "Minute", strval, strfilename) end sub dim nuse as integer dim nday as integer dim nhour as integer dim nminute as integer WriteRtuImgAutoTime("rtu001", 1, 15, 16, 17) ReadRtuImgAutoTime("rtu001", nuse, nday, nhour, nminute) msgbox nuse msgbox nday msgbox nhour msgbox nminute 1-111

127 3) FileExist 특정파일의존재여부를리턴한다. Integer FileExist(String FileName) 인자 FileName : 조사할파일경로참고 예제 Dim nexist As Integer nexist = FileExist("C: Sample2.ini"); MsgBox nexist 1 : 존재함, 0 : 존재하지않음 1-112

128 4) GetFileList 지정한디렉토리에서조건에맞는파일명들을구한다. Integer GetFileList (String Path, String Mask, String strfiles,, 0) 인자 Path : 폴더경로 Mask : 파일마스크 strfiles : 파일명을받을배열형스트링변수참고만약 String 변수의배열크기가반환하려는파일명의개수보다작으면 String 변수의크기는자동으로확장된다. 예제 dim strfiles(10) as string dim ncnt as integer ncnt = GetFileList ( c:/picture, *.bmp, strfiles,, 0) 1-113

129 5) GetFileName 지정한디렉토리에서조건에맞는파일명을구한다. String GetFileName (String Path, String Mask, integer Mode,, 0) 인자 Path : 폴더경로 Mask : 파일마스크 Mode : 모드 ( 파일속성 ) 참고 예제 Dim strfile as string ' 가장과거에생성된파일을찾는다. strfile = GetFileName("c:/picture", "", 0, "", 0); msgbox strfile ' 가장최근에생성된파일을찾는다. strfile = GetFileName("c:/picture", "", 1, "", 0); msgbox strfile ' 가장과거에수정된파일을찾는다. strfile = GetFileName("c:/picture", "", 2, "", 0); msgbox strfile ' 가장최근에수정된파일을찾는다. strfile = GetFileName("c:/picture", "*kla*.jpg", 3, "", 0); msgbox strfile 1-114

130 6) CopyFile 특정파일을다른이름으로복사한다. CopyFile(String SourceFile, String TargetFile, Integer FailIfExists) 인자 SourceFile : 복사를시행할원본파일명 TargetFile : 복사를시행할대상파일명 FailIfExists : Target 파일이이미존재한다면복사금지플래그참고리턴값없음예제 CopyFile("C: Sample.ini", "C: Sample.2ini", 0); Dim nnodetype as integer DeleteFile("D: EasyView3.0 bin EVFtpSync.dat") if nnodetype = 0 then ' 웹서버일경우 CopyFile("D: EasyView3.0 bin EVFtpSync_svr.dat", "D: EasyView3.0 bin EVFtpSync.dat", 0) else if nnodetype = 1 then ' 웹클라이언트일경우 CopyFile("D: EasyView3.0 bin EVFtpSync_cli.dat", "D: EasyView3.0 bin EVFtpSync.dat", 0) endif; endif; Execute("EVFtpSync.exe", ""); 1-115

131 7) CreateDirectory 디렉토리를생성한다. CreateDirectory(String Directory) 인자 Directory : 생성할디렉토리명참고리턴값없음예제 CreateDirectory("C: Test Test2 ); 1-116

132 8) Execute 로컬컴퓨터에저장되어있는실행가능한파일을실행한다. execute(string strfile, String strparms) 인자 strfile : 실행할파일명 strparms : 실행파일과함께실행될파라미터명참고리턴값없음예제 dim strfile as String dim strparms as St Execute("iexplore.exe", " Execute( EVTag.exe, ) 1-117

133 9) CloseWindow 현재실행된프로그램을찾아서종료한다. CloseWindow(String strtitle, String strclassname) 인자 strtitle : 프로그램의윈도우타이틀 strclassname : 프로그램의클래스명참고리턴값없음예제 dim strtitle as String dim strclassname as St CloseWindow(strClassName, ""); closewindow("", strtitle) 1-118

134 10) FileDump 사용자가지정한내용을텍스트파일에저장한다. FileDump(String strfile, String strmessage) 인자 strfile : 저장할파일명 strmessage: 저장할내용참고리턴값없음예제 Dim BeforeStr As String; Dim AfterStr As String; Dim nresult As Integer; BeforeStr = "ABCDefg"; AfterStr = StringMakeLower(BeforeStr); MsgBox AfterStr; ' => "abcdefg" 파일명은전체경로를지정하여야한다. FileDump("C: imsi.log", AfterStr); 여러줄로구분하여파일에저장한다. BeforeStr = "ABCDefg r n ABCDefg r n ABCDefg r n ABCDefg "; FileDump("C: imsi.log", AfterStr); BeforeStr = "ABCDefg + ABCDefg + ABCDefg + ABCDefg "; FileDump("C: imsi.log", AfterStr); 1-119

135 11) OpenFile 사용자가지정한텍스트파일을 Open 한다. OpenFile(String strfilepath, 0) 인자 strfilepath : Open 할파일경로참고리턴값없음예제 dim nfile as integer dim nret as integer dim nlen as integer dim strline as string dim strfile as string strfile = "D:/EasyView3.0/bin/FMS.ini" nlen = GetFileLength(strFile) nfile = OpenFile(strFile, 0); nret = SeekFile(nFile, 10, 1); while strline <> "###EOF###" strline = ReadLine(nFile, 1024, 0); msgbox strline wend nfile = CloseFile(nFile) 1-120

136 12) SeekFile 사용자가지정한텍스트파일에읽을위치설정. nret = SeekFile(Integer nfile, Integer NCount, Integer Set); 인자 Integer NCount : 현재 Cursor 에서 Move 할 Byte 수 ( 글자수 ) 참고 Integer Set #define SEEK_CUR 1 #define SEEK_END 2 #define SEEK_SET 0 예제 dim nfile as integer dim nret as integer dim nlen as integer dim strline as string dim strfile as string strfile = "D:/EasyView3.0/bin/FMS.ini" nlen = GetFileLength(strFile) nfile = OpenFile(strFile, 0); nret = SeekFile(nFile, 10, 1); while strline <> "###EOF###" strline = ReadLine(nFile, 1024, 0); msgbox strline wend nfile = CloseFile(nFile) 1-121

137 13) ReadLine 텍스트파일을한줄씩 Read 한다. strline = ReadLine(nFile, 1024, 0); 인자참고예제 dim nfile as integer dim nret as integer dim nlen as integer dim strline as string dim strfile as string strfile = "D:/EasyView3.0/bin/FMS.ini" nlen = GetFileLength(strFile) nfile = OpenFile(strFile, 0); nret = SeekFile(nFile, 10, 1); while strline <> "###EOF###" strline = ReadLine(nFile, 1024, 0); msgbox strline wend nfile = CloseFile(nFile) 1-122

138 14) WriteFile 해당문자열을지정한파일로로드한다. WriteFile(String strdirectory, String str) 인자 strdirectory 는절대경로를나타냄참고저장되는파일에줄바뀜을나타낼때는문자열다음에 n 을더해주면됨예제 WriteFile("C: EasyView3.0 Projects test.csv", "aaaa") WriteFile("C: EasyView3.0 Projects test.csv", " n") WriteFile("C: EasyView3.0 Projects test.csv", "bbbb") 1-123

139 15) Execute3 지정한폴더가바로로드된다. Execute3(, explorer.exe, String strdirectory, ) 인자 strdirectory 는절대파일경로임참고예제 Execute3("", "explorer.exe", " /n,/e,c: easyview3.0", "") 1-124

140 16) GetSystemDirectory 시스템디렉터리의경로를검색합니다. Public Class App Public Shared Sub Main() ' Call GetSystemDirectory. Dim sysdirbuffer As New StringBuilder( 256 ) LibWrap.GetSystemDirectory( sysdirbuffer, sysdirbuffer.capacity ) FORMATSTRING 표시할형식항목문자열을제공한다. public: virtual property String^ FormatString { String^ get (); void set (String^ value); } 1-125

141 1.2.9 엑셀관련함수 1) OpenExcelFile 엑셀파일을오픈하는함수이다. Integer OpenExcelFile(String strfilepath, String strsheet, String strdefault, Integer napp, integer nvisible); 인자 strfilepath 엑셀파일의절대경로 strsheet 엑셀파일의 Sheet 이름 strdefault 현재는공백 napp 해당엑셀파일의연결 ID nvisible 1 이면보임, 0 이면안보임 예제 dim napp as integer dim nvisable as integer nvisable = 1 nret = OpenExcelFile("c:/Book1.xls", "sheet1", "", napp, nvisable); 1-126

142 2) SetActiveSheet 엑셀파일의활성화할 sheet 를변경하는함수이다. Integer SetActiveSheet (Integer napp, string strsheet); 인자 napp 해당엑셀파일의연결 ID strsheetno 엑셀파일의 Sheet 이름 예제 dim napp as integer dim nvisable as integer nvisable = 1 nret = OpenExcelFile("c:/Book1.xls", "sheet1", "", napp, nvisable); nret = SetActiveSheet(nApp, "sheet2"); 1-127

143 3) SetCellValue 엑셀 sheet 의행과열에저장할값을지정하는함수이다. Integer SetCellValue (Integer napp, integer nrow, integer ncol, string strvalue); 인자 napp 해당엑셀파일의연결 ID nrow 해당엑셀 Sheet 의행번호 ncol 해당엑셀 Sheet 의열번호 strvalue 저장할값 예제 dim napp as integer dim nvisable as integer dim nret as integer dim nrow as integer dim ncol as integer nvisable = 1 nret = OpenExcelFile("c:/Book1.xls", "sheet1", "", napp, nvisable); nret = SetActiveSheet(nApp, "sheet2"); nrow = 1 ncol = 2 nret = SetCellValue(nApp, nrow, ncol, " "); 1-128

144 4) PrintExcelFile 해당엑셀파일을프린트하는함수이다. Integer PrintExcelFile (Integer napp); 인자 napp 해당엑셀파일의연결 ID 예제 dim napp as integer dim nvisable as integer dim nret as integer dim nrow as integer dim ncol as integer nvisable = 1 nret = OpenExcelFile("c:/Book1.xls", "sheet1", "", napp, nvisable); if nret = 1 then nret = SetActiveSheet(nApp, "sheet2"); nrow = 1 ncol = 2 nret = SetCellValue(nApp, nrow, ncol, " "); nrow = 1 ncol = 3 nret = SetCellValue(nApp, nrow, ncol, " "); endif nret = PrintExcelFile(nApp); 1-129

145 5) SaveExcelFile 해당엑셀파일을파일로저장하는함수이다. Integer SaveExcelFile (Integer napp); 인자 napp 해당엑셀파일의연결 ID 예제 dim napp as integer dim nvisable as integer dim nret as integer dim nrow as integer dim ncol as integer nvisable = 1 nret = OpenExcelFile("c:/Book1.xls", "sheet1", "", napp, nvisable); if nret = 1 then nret = SetActiveSheet(nApp, "sheet2"); nrow = 1 ncol = 2 nret = SetCellValue(nApp, nrow, ncol, " "); nrow = 1 ncol = 3 nret = SetCellValue(nApp, nrow, ncol, " "); nret = PrintExcelFile(nApp); nret = SaveExcelFile(nApp); endif 1-130

146 6) CloseExcelFile 연결된엑셀파일의접속을해제한다. Integer CloseExcelFile (Integer napp); 인자 napp 해당엑셀파일의연결 ID 예제 dim napp as integer dim nvisable as integer dim nret as integer dim nrow as integer dim ncol as integer nvisable = 1 nret = OpenExcelFile("c:/Book1.xls", "sheet1", "", napp, nvisable); if nret = 1 then nret = SetActiveSheet(nApp, "sheet2"); nrow = 1 ncol = 2 nret = SetCellValue(nApp, nrow, ncol, " "); nrow = 1 ncol = 3 nret = SetCellValue(nApp, nrow, ncol, " "); nret = PrintExcelFile(nApp); nret = SaveExcelFile(nApp); nret = CloseExcelFile(nApp); endif 1-131

147 기타함수 1) PasswordDialog 값을입력받는다이얼로그박스를출력할때, 입력받는값이보이지않는문자 (****) 로세팅된다. Integer PasswordDialog(String strtitle, String strmessage, String strinput); 인자 strtitle 메시지박스제목 strmessage 메시지박스에나타낼메시지문자열 strinput 입력받을문자열변수참고 예제 Dim xx As String Dim nresult As Integer nresult = PasswordDialog(" 비밀번호를입력하시오 ", " 비밀번호 ", xx); msgbox xx + " : " + nresult [ 그림 1.2-5] 비밀번호입력화면 1-132

148 2) IputDialog 값을입력받는다이얼로그박스를화면에나타낸다. String InputDialog(String strtitle, String strmessage); 인자 strtitle 메시지박스제목 strmessage 메시지박스메시지참고 예제 Dim StrInput As String StrInput = InputDialog(" 값을입력하시오 ", " 문자열을입력하세요 "); MsgBox StrInput; [ 그림 1.2-6] 문자열입력화면 1-133

149 3) CopyScanBuffer 소스스캔버퍼위치의지정개수만큼을타겟스캔버퍼위치에복사한다. Integer CopyScanBuffer(String strsourcedrvname, Integer nsourcesbaddr, Integer nsourcecnt, String strtargetdrvname, Integer ntargetsbaddr); 인자 strsourcedrvname : 소스스테이션명 nsourcesbaddr : 소스스테이션에서복사할 ScanBuffer 의시작주소 nsourcecnt : 복사를수행할 Word( 2Bytes) 개수 strtargetdrvname : 소스스테이션명 ntargetsbaddr: 타켓스테이션의복사를수행할 ScanBuffer 의시작주소참고 예제 Dim nresult as Integer nresult = CopyScanBuffer("s_01", 32760, 11, "s_02", 32760); [ 그림 1.2-7] 스캔버퍼 1-134

150 4) ClearScanBufferW 특정스테이션의지정한 Scan Buffer 주소부터 WORD 개수만큼 0 으로초기화한다. Integer ClearScanBufferW(String strdrvname, Integer nsbaddr, Integer ncnt); 인자 strdrvname : 스테이션명 nsbaddr : 0 으로초기화할 ScanBuffer 시작주소 ncnt : Word 개수참고 예제 Dim nresult As Integer nresult = ClearScanBufferW("s_01", 100, 1); 100 번지부터 1 word(2 Bytes) 를 0 으로초기화 1-135

151 5) ClearScanBufferB 특정스테이션의지정한 Scan Buffer 주소부터 BYTE 개수만큼 0 으로초기화한다. Integer ClearScanBufferB(String strdrvname, Integer nsbaddr, Integer ncnt); 인자 strdrvname : 스테이션명 nsbaddr : 0 으로초기화할 ScanBuffer 시작주소 ncnt : BYTE 개수참고 예제 Dim nresult As Integer nresult = ClearScanBufferB("s_01", 100, 3); 100 번지부터 3 Bytes 를 0 으로초기화 1-136

152 6) GetTickCount System 의총가동시간을구한다. TickCount 는컴퓨터가부팅된후부터지금까지흐른시간을 1/1000 초 ( 밀리초 ) 값으로반환한다. Float GetTickCount() 인자없음참고 예제 Dim Tick1, Tick2 As Float Tick1 = GetTickCount(); Sleep(100); Tick2 = GetTickCount(); MsgBox Tick2-Tick1; 1-137

153 7) RGB 시스템에서사용할수있는 RGB 색상값을생성한다. Integer RGB(Integer R, Integer G, Integer B) 인자 R : (Red 색상 ) G : (Green 색상 ) B : 0-255(Blue 색상 ) 참고 예제 Dim nrgb As Integer; nrgb = RGB(255, 255, 255); 1-138

154 8) PlaySound 특정 Wave 파일을연주한다. PlaySound(String wavefile, Integer nmode) 인자 wavefile : 연주할 Wave 파일 nmode : 1( 반복연주 ), 0( 한번만연주 ) 참고리턴값없음 예제 PlaySound( C: Alarm.wav, 0); 1-139

155 9) StopSound 모든 Wave 파일을연주를종료한다. StopSound() 인자참고리턴값없음예제 StopSound(); 1-140

156 10) GetLoginId / GetUserPw / GetLoginIdLevel 그래픽감시에서 Login 한 User 의 ID, PASSWORD, 등급을읽어온다. String GetLoginId 로그인 ID 를얻어온다. String GetUserPw 로그인 PW 를얻어온다. integer GetLoginIdLevel(String user) 로그인 PW 를얻어온다. 인자참고 GetLoginIdLevel 함수의 Return 값 0 : Supervisor, 1 : Operator 2 : Monitor, 3 과 4 : Spare 5 : 해당로그인 ID 가존재하지않음 user 가비어있으면현재로그인한사용자의레벨이반환된다. 예제 dim strid as string dim strpw as string dim nlevel as integer strid = GetLoginId() strpw = GetUserPw(strID) nlevel = GetLoginIdLevel(strID) 1-141

157 11) SetObjectLock 그래픽감시에서, Page 에 Object 를사용자가마우스로선택하지못하도록한다. SetObjectLock(String PageName, String ObjectName, Integer State); 인자 PageName : Object 가있는 page Name ObjectName : 해당 Page 에 Lock 을걸고싶은객체 Name States ( 0 : Lock, 1 : LockFree ) 참고예제 dim nresult As Integer nresult = SetObjectLock( Main_Page.jcg, Button_1, 1); 1-142

158 12) GetUnAckedAlarmCount EasyView 엔진에서 Ack 한알람 Counter 를얻어온다. GetUnAckedAlarmCount(); 인자참고 Ack 한알람 Counter < 0 : 예외처리엔진에서 Alarm Counter 를계산할때함수가실행될경우, 정확한 Counter 를얻지못하기때문에 -1 이란값을가지게된다. 예제 dim nresult As Integer nresult = GetUnAckedAlarmCount(); 1-143

159 13) Beep 비프음을나타내는함수이다. Beep(String strdraw, Integer Herz, Integer ntime) 인자 Herz 의값에따라음이달라짐 ntime 은음이나오는시간 참고예제 dim nret as integer nret = Beep("main.jcg", 10000, 1000) 1-144

160 14) PlayWave Wav 파일의음을듣고자할때쓰는함수이다. PlayWave(String strdraw, string strdirectory, Integer ntype) 인자 strdirectory 는 wav 파일의절대경로를나타냄. ntype 이 0 이면한번만재생하고 1 이면반복재생이다. 참고예제 nret = PlayWave ("main.jcg", "c:/easyview3.0/projects/test_listctrl/sound ALARM.WAV ", 1) 1-145

161 15) Msgbox 사용자가지정한스트링이나값을메시지박스에표시한다. Msgbox abd 인자나타내고자하는스트링이나값참고예제 Msgbox "abc" Msgbox "abc" + "def"

162 16) MessageBox 사용자가지정한스트링이나값을메시지박스에표시한다. MessageBox("display text", "window title", 버튼스타일, 아이콘스타일, 디폴트버튼, 모달스타일 ) 인자 display text : 표시되는문자열메시지 window title : 타이틀에표시되는문자열버튼스타일 : 표시된는버튼스타일 MB_OK 0 MB_OKCANCEL 1 MB_ABORTRETRYIGNORE 2 MB_YESNOCANCEL 3 MB_YESNO 4 MB_RETRYCANCEL 5 아이콘스타일 : 표시되는아이콘스타일 MB_ICONERROR 16 MB_ICONQUESTION 32 MB_ICONWARNING 48 MB_ICONASTERISK 64 디폴트버튼 : 포커스가설정되는디폴트버튼 MB_DEFBUTTON1 0 MB_DEFBUTTON2 256 MB_DEFBUTTON3 512 모달스타일 : 메시지박스의모달스타일 MB_APPLMODAL 0 MB_SYSTEMMODAL 4096 MB_TASKMODAL 8192 참고예제 Dim nret as integer nret = MessageBox("display text", "window title", 4, 32, 256, 0) 1-147

163 17) SENDWINDOWMESSAGE 사용 Dim<span id="parametertooltip" class="tip" tabindex="0">message</span> As Integer Dim <span id="parametertooltip" class="tip" tabindex="0">wparam</span> As Integer Dim <span id="parametertooltip" class="tip" tabindex="0">lparam</span> As Integer Dim task1 As Task task1.sendwindowmessage(<span id="parametertooltip" class="tip" tabindex="0">message</span>, <span id="parametertooltip" class="tip" tabindex="0">wparam</span>, <span id="parametertooltip" class="tip" tabindex="0">lparam</span>) public: Void SendWindowMessage( Int32 Message, Int32 wparam, Int32 lparam ); 1-148

164 시스템접근용메소드 1) 기본알람그룹에속한알람발생개수참조 1024 개기본알람그룹에서발생된알람개수를참조한다. Integer $System.AlarmGroup(Integer nindex).total Integer $System.AlarmGroup(Integer nindex).hihi Integer $System.AlarmGroup(Integer nindex).high Integer $System.AlarmGroup(Integer nindex).medium Integer $System.AlarmGroup(Integer nindex).low Integer $System.AlarmGroup(Integer nindex).lolo 또는 Integer $System.AlarmGroup(String BAGName).Total Integer $System.AlarmGroup(String BAGName).HiHi Integer $System.AlarmGroup(String BAGName).High Integer $System.AlarmGroup(String BAGName).Medium Integer $System.AlarmGroup(String BAGName).Low Integer $System.AlarmGroup(String BAGName).LoLo 인자 nindex : ( 기본알람그룹을가리키는인덱스 ) BAGName : 기본알람그룹명또는 ALL 참고예제 nalarm = $System.AlarmGroup(1).Total; '2 번째기본알람그룹에서발생한알람총개수 nalarm = $System.AlarmGroup(0).HiHi; '1 번째기본알람그룹에서발생한 HiHi 레벨알람개수 nalarm = $System.AlarmGroup("CHILLER").Medium; ' 기본알람그룹명이 CHILLER 인곳에서발생한 Medium 레벨알람개수 nalarm = $System.AlarmGroup( ALL ).Total; ' 프로젝트전체에서발생한알람총개수 1-149

165 2) 프로젝트의태그개수참조현재프로젝트의 Station 개수, DI 태그개수, AI 태그개수, String 태그개수, DO 태그개수, AO 태그개수를참조한다. Integer $System.StationCount Integer $System.DiCount Integer $System.AiCount Integer $System.StrCount Integer $System.DoCount Integer $System.AoCount 인자참고예제 Dim NNN As Integer NNN = $System.StationCount; MsgBox NNN NNN = $System.DiCount; MsgBox NNN 1-150

166 3) 프로젝트에서발생한알람개수참조현재프로젝트에서발생한레벨별알람개수를참조한다. Integer $System.TotalAlarm Integer $System.HiHiAlarm Integer $System.HighAlarm Integer $System.MediumAlarm Integer $System.LowAlarm Integer $System.LoLoAlarm 인자참고예제 Dim NNN As Integer NNN = $System.TotalAlarm; 전체알람개수 MsgBox NNN NNN = $System.HiHiAlarm; HiHi 레벨알람개수 MsgBox NNN $System.TotalAlarm : 현재프로젝트에서발생한총알람수 Dim nprjtotalarm as Integer nprjtotalarm = $System.TotalAlarm $System.HiHIAlarm : 현재프로젝트에서발생한 HiHi 레벨총알람수 Dim nprjhihialarm as Integer nprjtotalarm = $System.HiHiAlarm $System.Driver(1).TotalAlarm : 첫번째 Station 에서발생한총알람수 Dim ndrv1totalarm as Integer ndrv1totalarm = $System.Driver(1).TotalAlarm $System.AlarmGroup(0).Count : 첫번째기본알람그룹에서발생한총알람수 Dim nalarmgrp1totalarm as Integer nalarmgrp1totalarm = $System.AlarmGroup(1).TotalAlarm 1-151

167 4) 태그의 Active 상태참조및설정동적으로태그의 Active 여부를설정한다. Integer $System.IOTag(String TagName).Active 참조 $System.IOTag(String TagName).Active = 1 or 0 설정인자 TagName : 태그명참고예제 MsgBox $System.IOTag("L12CHIA10001_AL147_00").Active; 1 or 0 $System.IOTag("L12CHIA10001_AL147_00").Active = 0; 비활성화시킴 1-152

168 5) 그래픽 Object 의속성설정활성화되어있는도면에속한그래픽 Object 의속성을변경한다. $System.Graphic(String strdraw).object(string strobj).visible : 객체의보이기 / 안보이기상태를변경한다. $System.Graphic(String strdraw).object(string strobj).fillcolor : 객체내부의채우기색상을변경한다. $System.Graphic(String strdraw).object(string strobj).linecolor : 객체의테두리색상을변경한다. $System.Graphic(String strdraw).object(string strobj).textcolor : 문자열객체의글자색을변경한다. $System.Graphic(String strdraw).object(string strobj).resetdata() : 리스트의내용을삭제하거나트랜드의화면을클리어한다. $System.Graphic(String jcgfile).object(string objectname).check : 체크박스를체크한다. $System.Graphic(String jcgfile).object(string objectname).addstring : 리스트박스, 콤보박스에서문자열을추가한다. $System.Graphic(String jcgfile).object(string objectname).setcurstr : 리스트박스, 콤보박스에서지정한문자를찾아서선택한다. $System.Graphic(String jcgfile).object(string objectname).setcursel : 리스트박스, 콤보박스에서지정한인덱스를선택한다. $System.Graphic(String jcgfile).object(string objectname).reloadimage : 이미지객체가표시하는이미지파일을바꾼다. 변경할이미지파일의경로는전체경로를지정해주어야한다. ( c:/image/aaa.bmp ) 1-153

169 인자 jcgfile :.JCG 파일명 objectname : JCG 파일에존재하는그래픽 Object 명 [ 그림 1.2-8] 태그기본정보참고예제 $System.Graphic("main.jcg").Object("Text1").Visible = 1; $System.Graphic("main.jcg").Object("Text1").FillColor = RGB(255,255,255); $System.Graphic("main.jcg").Object("Text1").LineColor = RGB(0,0,0); $System.Graphic("main.jcg").Object("Text1").TextColor = RGB(255,0,0); $System.Graphic(" 상황판.jcg").Object("cbo0001").SetCurSel = 1 $System.Graphic(" 상황판.jcg").Object("cbo0001").SetCurStr = " 기흥 4 라인 " $System.Graphic("main.jcg").Object("Trend1").ResetData(); $System.Graphic("main.jcg").Object("List1").ResetData(); $System.Graphic("startup.jcg").Object("ppic").ReloadImage = "D:/Document/ 회사자료 /EasyView3.0/ 평택시로고.jpg" $System.Graphic("main.jcg").Object("Text1").Visible = 1; $System.Graphic("Main.jcg").Object("Title_Fst").Visible = 0; $System.Graphic("Main.jcg").Object("Title_Unisem").Visible = 0; 1-154

170 $System.Graphic("Main.jcg").Object("Title_Thc").Visible = 0; $System.Graphic("Main.jcg").Object("PH1").Visible = 0; $System.Graphic("Main.jcg").Object("PH2").Visible = 0; $System.Graphic("Main.jcg").Object("PH3").Visible = 0; $System.Graphic("main.jcg").Object("Text1").FillColor = RGB(255,255,255); $System.Graphic("main.jcg").Object("Text1").LineColor = RGB(0,0,0); $System.Graphic("main.jcg").Object("Text1").TextColor = RGB(255,0,0); $System.Graphic("main.jcg").Object("Trend1").ResetData(); $System.Graphic("main.jcg").Object("List1").ResetData(); Dim color As Integer 입력한생상을변수로지정하여사용할수있다. color = RGB(128,128,128); $System.Graphic("main.jcg").Object("Text1").FillColor = color; $System.Graphic("main.jcg").Object("Text1").LineColor = color; $System.Graphic("main.jcg").Object("Text1").TextColor = color; 1-155

171 6) GetNodeType 현재실행되는엔진의노드타입을구한다. Integer GetNodeType() 인자빌더의프로젝트 / 로컬운영정보설정 / 네트웍 / 노드타입의인텍스참고예제 Msgbox GetNodeType() 1-156

172 7) GetNodeName 현재실행되는엔진의노드타입을구한다. String GetNodeName() 인자빌더의프로젝트 / 로컬운영정보설정 / 네트웍 / 노드명참고예제 Msgbox GetNodeName() 1-157

173 8) GetInstallPath 시스템이설치된경로를반환한다. String GetInstallPath() 인자참고예제 dim strinstallpath as string strinstallpath = GetInstallPath() 1-158

174 9) GetProjectName 현재실행되고있는프로젝트명을반환한다. String GetProjectName() 인자참고예제 dim strprojectname as string strprojectname = GetProjectName () 1-159

175 10) 시스템에등록된 I/O 디바이스명가져오기현재구동중인 I/O 디바이스의이름을반환한다. String $System.IODevice(integer nstn).name 인자참고예제 Dim nstn as Integer Dim strdev as string nstn = 1 strdev = $System.IODevice(nStn).Name 1-160

176 메모리태그의태그포인터기능메모리태그는 IO 태그에대한포인터역할을수행할수있다. ( 단, DI 메모리태그는 DI IO 태그 ( 실태그 ) 를, AI 메모리태그는 AI IO 태그 ( 실태그 ) 를가리켜야한다.) - 아래와같이 AI 메모리태그를설정한다. [ 그림 1.2-9] AI 메모리태그설정 = L12CHIA10001_LS113 으로지정하면, 의값은 L12CHIA10001_LS113 태그의값을지칭하게된다. = = " L12CHIA10001_LS113"; L12VARIATION_MEM; = 100; L12CHIA10001_LS113; 100 Dim mcode AS String mcode = = mcode + "_LS103_00"; 1-161

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

More information

Microsoft PowerPoint - chap04-연산자.pptx

Microsoft PowerPoint - chap04-연산자.pptx int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); } 1 학습목표 수식의 개념과 연산자, 피연산자에 대해서 알아본다. C의 를 알아본다. 연산자의 우선 순위와 결합 방향에

More information

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 (   ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각 JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( http://java.sun.com/javase/6/docs/api ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각선의길이를계산하는메소드들을작성하라. 직사각형의가로와세로의길이는주어진다. 대각선의길이는 Math클래스의적절한메소드를이용하여구하라.

More information

Visual Basic 반복문

Visual Basic 반복문 학습목표 반복문 For Next문, For Each Next문 Do Loop문, While End While문 구구단작성기로익히는반복문 2 5.1 반복문 5.2 구구단작성기로익히는반복문 3 반복문 주어진조건이만족하는동안또는주어진조건이만족할때까지일정구간의실행문을반복하기위해사용 For Next For Each Next Do Loop While Wend 4 For

More information

금오공대 컴퓨터공학전공 강의자료

금오공대 컴퓨터공학전공 강의자료 C 프로그래밍프로젝트 Chap 14. 포인터와함수에대한이해 2013.10.09. 오병우 컴퓨터공학과 14-1 함수의인자로배열전달 기본적인인자의전달방식 값의복사에의한전달 val 10 a 10 11 Department of Computer Engineering 2 14-1 함수의인자로배열전달 배열의함수인자전달방식 배열이름 ( 배열주소, 포인터 ) 에의한전달 #include

More information

API 매뉴얼

API 매뉴얼 PCI-DIO12 API Programming (Rev 1.0) Windows, Windows2000, Windows NT and Windows XP are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations mentioned

More information

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 비트연산자 1 1 비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 진수법! 2, 10, 16, 8! 2 : 0~1 ( )! 10 : 0~9 ( )! 16 : 0~9, 9 a, b,

More information

OCW_C언어 기초

OCW_C언어 기초 초보프로그래머를위한 C 언어기초 4 장 : 연산자 2012 년 이은주 학습목표 수식의개념과연산자및피연산자에대한학습 C 의알아보기 연산자의우선순위와결합방향에대하여알아보기 2 목차 연산자의기본개념 수식 연산자와피연산자 산술연산자 / 증감연산자 관계연산자 / 논리연산자 비트연산자 / 대입연산자연산자의우선순위와결합방향 조건연산자 / 형변환연산자 연산자의우선순위 연산자의결합방향

More information

윈도우즈프로그래밍(1)

윈도우즈프로그래밍(1) 제어문 (2) For~Next 문 윈도우즈프로그래밍 (1) ( 신흥대학교컴퓨터정보계열 ) 2/17 Contents 학습목표 프로그램에서주어진특정문장을부분을일정횟수만큼반복해서실행하는문장으로 For~Next 문등의구조를이해하고활용할수있다. 내용 For~Next 문 다중 For 문 3/17 제어문 - FOR 문 반복문 : 프로그램에서주어진특정문장들을일정한횟수만큼반복해서실행하는문장

More information

PowerPoint Presentation

PowerPoint Presentation Class - Property Jo, Heeseung 목차 section 1 클래스의일반구조 section 2 클래스선언 section 3 객체의생성 section 4 멤버변수 4-1 객체변수 4-2 클래스변수 4-3 종단 (final) 변수 4-4 멤버변수접근방법 section 5 멤버변수접근한정자 5-1 public 5-2 private 5-3 한정자없음

More information

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D> 리눅스 오류처리하기 2007. 11. 28 안효창 라이브러리함수의오류번호얻기 errno 변수기능오류번호를저장한다. 기본형 extern int errno; 헤더파일 라이브러리함수호출에실패했을때함수예 정수값을반환하는함수 -1 반환 open 함수 포인터를반환하는함수 NULL 반환 fopen 함수 2 유닉스 / 리눅스 라이브러리함수의오류번호얻기 19-1

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 실습 1 배효철 th1g@nate.com 1 목차 조건문 반복문 System.out 구구단 모양만들기 Up & Down 2 조건문 조건문의종류 If, switch If 문 조건식결과따라중괄호 { 블록을실행할지여부결정할때사용 조건식 true 또는 false값을산출할수있는연산식 boolean 변수 조건식이 true이면블록실행하고 false 이면블록실행하지않음 3

More information

강의 개요

강의 개요 DDL TABLE 을만들자 웹데이터베이스 TABLE 자료가저장되는공간 문자자료의경우 DB 생성시지정한 Character Set 대로저장 Table 생성시 Table 의구조를결정짓는열속성지정 열 (Clumn, Attribute) 은이름과자료형을갖는다. 자료형 : http://dev.mysql.cm/dc/refman/5.1/en/data-types.html TABLE

More information

Microsoft PowerPoint - chap06-2pointer.ppt

Microsoft PowerPoint - chap06-2pointer.ppt 2010-1 학기프로그래밍입문 (1) chapter 06-2 참고자료 포인터 박종혁 Tel: 970-6702 Email: jhpark1@snut.ac.kr 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- 포인터의정의와사용 변수를선언하는것은메모리에기억공간을할당하는것이며할당된이후에는변수명으로그기억공간을사용한다. 할당된기억공간을사용하는방법에는변수명외에메모리의실제주소값을사용하는것이다.

More information

학습목표 함수프로시저, 서브프로시저의의미를안다. 매개변수전달방식을학습한다. 함수를이용한프로그래밍한다. 2

학습목표 함수프로시저, 서브프로시저의의미를안다. 매개변수전달방식을학습한다. 함수를이용한프로그래밍한다. 2 학습목표 함수프로시저, 서브프로시저의의미를안다. 매개변수전달방식을학습한다. 함수를이용한프로그래밍한다. 2 6.1 함수프로시저 6.2 서브프로시저 6.3 매개변수의전달방식 6.4 함수를이용한프로그래밍 3 프로시저 (Procedure) 프로시저 (Procedure) 란무엇인가? 논리적으로묶여있는하나의처리단위 내장프로시저 이벤트프로시저, 속성프로시저, 메서드, 비주얼베이직내장함수등

More information

Microsoft PowerPoint - chap03-변수와데이터형.pptx

Microsoft PowerPoint - chap03-변수와데이터형.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num %d\n", num); return 0; } 1 학습목표 의 개념에 대해 알아본다.

More information

Microsoft PowerPoint 자바-기본문법(Ch2).pptx

Microsoft PowerPoint 자바-기본문법(Ch2).pptx 자바기본문법 1. 기본사항 2. 자료형 3. 변수와상수 4. 연산자 1 주석 (Comments) 이해를돕기위한설명문 종류 // /* */ /** */ 활용예 javadoc HelloApplication.java 2 주석 (Comments) /* File name: HelloApplication.java Created by: Jung Created on: March

More information

Microsoft PowerPoint - ch07 - 포인터 pm0415

Microsoft PowerPoint - ch07 - 포인터 pm0415 2015-1 프로그래밍언어 7. 포인터 (Pointer), 동적메모리할당 2015 년 4 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) Outline 포인터 (pointer) 란? 간접참조연산자

More information

chap 5: Trees

chap 5: Trees 5. Threaded Binary Tree 기본개념 n 개의노드를갖는이진트리에는 2n 개의링크가존재 2n 개의링크중에 n + 1 개의링크값은 null Null 링크를다른노드에대한포인터로대체 Threads Thread 의이용 ptr left_child = NULL 일경우, ptr left_child 를 ptr 의 inorder predecessor 를가리키도록변경

More information

DBMS & SQL Server Installation Database Laboratory

DBMS & SQL Server Installation Database Laboratory DBMS & 조교 _ 최윤영 } 데이터베이스연구실 (1314 호 ) } 문의사항은 cyy@hallym.ac.kr } 과제제출은 dbcyy1@gmail.com } 수업공지사항및자료는모두홈페이지에서확인 } dblab.hallym.ac.kr } 홈페이지 ID: 학번 } 홈페이지 PW:s123 2 차례 } } 설치전점검사항 } 설치단계별설명 3 Hallym Univ.

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 클래스, 객체, 메소드 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 필드만있는클래스 텔레비젼 2 예제 1. 필드만있는클래스 3 예제 2. 여러개의객체생성하기 4 5 예제 3. 메소드가추가된클래스 public class Television { int channel; // 채널번호 int volume; // 볼륨 boolean

More information

SQL Developer Connect to TimesTen 유니원아이앤씨 DB 기술지원팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 작성자

SQL Developer Connect to TimesTen 유니원아이앤씨 DB 기술지원팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 작성자 SQL Developer Connect to TimesTen 유니원아이앤씨 DB 팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 2010-07-28 작성자 김학준 최종수정일 2010-07-28 문서번호 20100728_01_khj 재개정이력 일자내용수정인버전

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 3 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

Microsoft PowerPoint - C프로그래밍-chap03.ppt [호환 모드]

Microsoft PowerPoint - C프로그래밍-chap03.ppt [호환 모드] Chapter 03 변수와자료형 2009 한국항공대학교항공우주기계공학부 (http://mercury.kau.ac.kr/sjkwon) 1 변수와자료유형 변수 프로그램에서자료값을임시로기억할수있는저장공간을변수 (variables) 변수 (Variables) 는컴퓨터의메모리인 RAM(Random Access Memory) 에저장 물건을담는박스라고생각한다면박스의크기에따라담을물건이제한됨

More information

Microsoft PowerPoint - e pptx

Microsoft PowerPoint - e pptx Import/Export Data Using VBA Objectives Referencing Excel Cells in VBA Importing Data from Excel to VBA Using VBA to Modify Contents of Cells 새서브프로시저작성하기 프로시저실행하고결과확인하기 VBA 코드이해하기 Referencing Excel Cells

More information

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt 변수와상수 1 변수란무엇인가? 변수 : 정보 (data) 를저장하는컴퓨터내의특정위치 ( 임시저장공간 ) 메모리, register 메모리주소 101 번지 102 번지 변수의크기에따라 주로 byte 단위 메모리 2 기본적인변수형및변수의크기 변수의크기 해당컴퓨터에서는항상일정 컴퓨터마다다를수있음 short

More information

Microsoft PowerPoint - Java7.pptx

Microsoft PowerPoint - Java7.pptx HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)

More information

목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2

목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2 제 8 장. 포인터 목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2 포인터의개요 포인터란? 주소를변수로다루기위한주소변수 메모리의기억공간을변수로써사용하는것 포인터변수란데이터변수가저장되는주소의값을 변수로취급하기위한변수 C 3 포인터의개요 포인터변수및초기화 * 변수데이터의데이터형과같은데이터형을포인터 변수의데이터형으로선언 일반변수와포인터변수를구별하기위해

More information

Microsoft PowerPoint - 10Àå.ppt

Microsoft PowerPoint - 10Àå.ppt 10 장. DB 서버구축및운영 DBMS 의개념과용어를익힌다. 간단한 SQL 문법을학습한다. MySQL 서버를설치 / 운영한다. 관련용어 데이터 : 자료 테이블 : 데이터를표형식으로표현 레코드 : 테이블의행 필드또는컬럼 : 테이블의열 필드명 : 각필드의이름 데이터타입 : 각필드에입력할값의형식 학번이름주소연락처 관련용어 DB : 테이블의집합 DBMS : DB 들을관리하는소프트웨어

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Lecture 02 프로그램구조및문법 Kwang-Man Ko kkmam@sangji.ac.kr, compiler.sangji.ac.kr Department of Computer Engineering Sang Ji University 2018 자바프로그램기본구조 Hello 프로그램구조 sec01/hello.java 2/40 자바프로그램기본구조 Hello 프로그램구조

More information

문서 템플릿

문서 템플릿 HDSI 툴분석 [sql injection 기술명세서 ] Sql injection 기술명세서 Ver. 0.01 이문서는 sql injection 기술명세가범위입니다. Copyrights Copyright 2009 by CanvasTeam@SpeeDroot( 장경칩 ) All Rights Reserved. 장경칩의사전승인없이본내용의전부또는일부에대한복사, 전재,

More information

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770>

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770> 연습문제해답 5 4 3 2 1 0 함수의반환값 =15 5 4 3 2 1 0 함수의반환값 =95 10 7 4 1-2 함수의반환값 =3 1 2 3 4 5 연습문제해답 1. C 언어에서의배열에대하여다음중맞는것은? (1) 3차원이상의배열은불가능하다. (2) 배열의이름은포인터와같은역할을한다. (3) 배열의인덱스는 1에서부터시작한다. (4) 선언한다음, 실행도중에배열의크기를변경하는것이가능하다.

More information

Java ...

Java ... 컴퓨터언어 1 Java 제어문 조성일 조건문 : if, switch 어떠한조건을조사하여각기다른명령을실행 if 문, switch 문 if 문 if - else 문형식 if 문형식 if ( 조건식 ) { 명령문 1; 명령문 2;... if ( 조건식 ) { 명령문 1; 명령문 2;... else { 명령문 a; 명령문 b;... 예제 1 정수를입력받아짝수와홀수를판별하는프로그램을작성하시오.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 HTML5 웹프로그래밍입문 부록. 웹서버구축하기 1 목차 A.1 웹서버시스템 A.2 PHP 사용하기 A.3 데이터베이스연결하기 2 A.1 웹서버시스템 3 웹서버의구축 웹서버컴퓨터구축 웹서버소프트웨어설치및실행 아파치 (Apache) 웹서버가대표적 서버실행프로그램 HTML5 폼을전달받아처리 PHP, JSP, Python 등 데이터베이스시스템 서버측에데이터를저장및효율적관리

More information

API 매뉴얼

API 매뉴얼 PCI-TC03 API Programming (Rev 1.0) Windows, Windows2000, Windows NT, Windows XP and Windows 7 are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations

More information

쉽게

쉽게 Power Java 제 4 장자바프로그래밍기초 이번장에서학습할내용 자바프로그램에대한기초사항을학습 자세한내용들은추후에. Hello.java 프로그램 주석 주석 (comment): 프로그램에대한설명을적어넣은것 3 가지타입의주석 클래스 클래스 (class): 객체를만드는설계도 ( 추후에학습 ) 자바프로그램은클래스들로구성된다. 그림 4-1. 자바프로그램의구조 클래스정의

More information

슬라이드 1

슬라이드 1 Pairwise Tool & Pairwise Test NuSRS 200511305 김성규 200511306 김성훈 200614164 김효석 200611124 유성배 200518036 곡진화 2 PICT Pairwise Tool - PICT Microsoft 의 Command-line 기반의 Free Software www.pairwise.org 에서다운로드후설치

More information

KNK_C_05_Pointers_Arrays_structures_summary_v02

KNK_C_05_Pointers_Arrays_structures_summary_v02 Pointers and Arrays Structures adopted from KNK C Programming : A Modern Approach 요약 2 Pointers and Arrays 3 배열의주소 #include int main(){ int c[] = {1, 2, 3, 4}; printf("c\t%p\n", c); printf("&c\t%p\n",

More information

Microsoft PowerPoint - chap05-제어문.pptx

Microsoft PowerPoint - chap05-제어문.pptx int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); 1 학습목표 제어문인,, 분기문에 대해 알아본다. 인 if와 switch의 사용 방법과 사용시 주의사항에 대해 알아본다.

More information

PCServerMgmt7

PCServerMgmt7 Web Windows NT/2000 Server DP&NM Lab 1 Contents 2 Windows NT Service Provider Management Application Web UI 3 . PC,, Client/Server Network 4 (1),,, PC Mainframe PC Backbone Server TCP/IP DCS PLC Network

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Chapter 06 반복문 01 반복문의필요성 02 for문 03 while문 04 do~while문 05 기타제어문 반복문의의미와필요성을이해한다. 대표적인반복문인 for 문, while 문, do~while 문의작성법을 알아본다. 1.1 반복문의필요성 반복문 동일한내용을반복하거나일정한규칙으로반복하는일을수행할때사용 프로그램을좀더간결하고실제적으로작성할수있음.

More information

<4D F736F F F696E74202D203137C0E55FBFACBDC0B9AEC1A6BCD6B7E7BCC72E707074>

<4D F736F F F696E74202D203137C0E55FBFACBDC0B9AEC1A6BCD6B7E7BCC72E707074> SIMATIC S7 Siemens AG 2004. All rights reserved. Date: 22.03.2006 File: PRO1_17E.1 차례... 2 심벌리스트... 3 Ch3 Ex2: 프로젝트생성...... 4 Ch3 Ex3: S7 프로그램삽입... 5 Ch3 Ex4: 표준라이브러리에서블록복사... 6 Ch4 Ex1: 실제구성을 PG 로업로드하고이름변경......

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 System Software Experiment 1 Lecture 5 - Array Spring 2019 Hwansoo Han (hhan@skku.edu) Advanced Research on Compilers and Systems, ARCS LAB Sungkyunkwan University http://arcs.skku.edu/ 1 배열 (Array) 동일한타입의데이터가여러개저장되어있는저장장소

More information

Tcl의 문법

Tcl의 문법 월, 01/28/2008-20:50 admin 은 상당히 단순하고, 커맨드의 인자를 스페이스(공백)로 단락을 짓고 나열하는 정도입니다. command arg1 arg2 arg3... 한행에 여러개의 커맨드를 나열할때는, 세미콜론( ; )으로 구분을 짓습니다. command arg1 arg2 arg3... ; command arg1 arg2 arg3... 한행이

More information

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Function) 1. 함수의개념 입력에대해적절한출력을발생시켜주는것 내가 ( 프로그래머 ) 작성한명령문을연산, 처리, 실행해주는부분 ( 모듈 ) 자체적으로실행되지않으며,

More information

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074>

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074> Chap #2 펌웨어작성을위한 C 언어 I http://www.smartdisplay.co.kr 강의계획 Chap1. 강의계획및디지털논리이론 Chap2. 펌웨어작성을위한 C 언어 I Chap3. 펌웨어작성을위한 C 언어 II Chap4. AT89S52 메모리구조 Chap5. SD-52 보드구성과코드메모리프로그래밍방법 Chap6. 어드레스디코딩 ( 매핑 ) 과어셈블리어코딩방법

More information

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate ALTIBASE HDB 6.1.1.5.6 Patch Notes 목차 BUG-39240 offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG-41443 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate 한뒤, hash partition

More information

목차 BUG 문법에맞지않는질의문수행시, 에러메시지에질의문의일부만보여주는문제를수정합니다... 3 BUG ROUND, TRUNC 함수에서 DATE 포맷 IW 를추가지원합니다... 5 BUG ROLLUP/CUBE 절을포함하는질의는 SUBQUE

목차 BUG 문법에맞지않는질의문수행시, 에러메시지에질의문의일부만보여주는문제를수정합니다... 3 BUG ROUND, TRUNC 함수에서 DATE 포맷 IW 를추가지원합니다... 5 BUG ROLLUP/CUBE 절을포함하는질의는 SUBQUE ALTIBASE HDB 6.3.1.10.1 Patch Notes 목차 BUG-45710 문법에맞지않는질의문수행시, 에러메시지에질의문의일부만보여주는문제를수정합니다... 3 BUG-45730 ROUND, TRUNC 함수에서 DATE 포맷 IW 를추가지원합니다... 5 BUG-45760 ROLLUP/CUBE 절을포함하는질의는 SUBQUERY REMOVAL 변환을수행하지않도록수정합니다....

More information

Windows 8에서 BioStar 1 설치하기

Windows 8에서 BioStar 1 설치하기 / 콘텐츠 테이블... PC에 BioStar 1 설치 방법... Microsoft SQL Server 2012 Express 설치하기... Running SQL 2012 Express Studio... DBSetup.exe 설정하기... BioStar 서버와 클라이언트 시작하기... 1 1 2 2 6 7 1/11 BioStar 1, Windows 8 BioStar

More information

Microsoft PowerPoint 웹 연동 기술.pptx

Microsoft PowerPoint 웹 연동 기술.pptx 웹프로그래밍및실습 ( g & Practice) 문양세강원대학교 IT 대학컴퓨터과학전공 URL 분석 (1/2) URL (Uniform Resource Locator) 프로토콜, 호스트, 포트, 경로, 비밀번호, User 등의정보를포함 예. http://kim:3759@www.hostname.com:80/doc/index.html URL 을속성별로분리하고자할경우

More information

C 프로그램의 기본

C 프로그램의 기본 C 프로그램의기본 목차 C 프로그램의구성요소 주석 main 함수 출력 C 언어의입력과출력 변수 printf 함수 scanf 함수 2 예제 2-1 : 첫번째 C 프로그램 3 2.1.1 주석 주석의용도 프로그램에대한설명 프로그램전체에대한대략적인정보를제공 프로그램수행에영향을미치지않는요소 4 2.1.1 주석 주석사용방법 /* 과 */ 을이용한여러줄주석 // 을이용한한줄주석

More information

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc NTAS and FRAME BUILDER Install Guide NTAS and FRAME BUILDER Version 2.5 Copyright 2003 Ari System, Inc. All Rights reserved. NTAS and FRAME BUILDER are trademarks or registered trademarks of Ari System,

More information

프로그래밍개론및실습 2015 년 2 학기프로그래밍개론및실습과목으로본내용은강의교재인생능출판사, 두근두근 C 언어수업, 천인국지음을발췌수정하였음

프로그래밍개론및실습 2015 년 2 학기프로그래밍개론및실습과목으로본내용은강의교재인생능출판사, 두근두근 C 언어수업, 천인국지음을발췌수정하였음 프로그래밍개론및실습 2015 년 2 학기프로그래밍개론및실습과목으로본내용은강의교재인생능출판사, 두근두근 C 언어수업, 천인국지음을발췌수정하였음 CHAPTER 9 둘중하나선택하기 관계연산자 두개의피연산자를비교하는연산자 결과값은참 (1) 아니면거짓 (0) x == y x 와 y 의값이같은지비교한다. 관계연산자 연산자 의미 x == y x와 y가같은가? x!= y

More information

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 System call table and linkage v Ref. http://www.ibm.com/developerworks/linux/library/l-system-calls/ - 2 - Young-Jin Kim SYSCALL_DEFINE 함수

More information

파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter

파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter 파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter 클래스의사용법은다음과같다. PrintWriter writer = new PrintWriter("output.txt");

More information

Microsoft PowerPoint - chap06-1Array.ppt

Microsoft PowerPoint - chap06-1Array.ppt 2010-1 학기프로그래밍입문 (1) chapter 06-1 참고자료 배열 박종혁 Tel: 970-6702 Email: jhpark1@snut.ac.kr 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- 배열의선언과사용 같은형태의자료형이많이필요할때배열을사용하면효과적이다. 배열의선언 배열의사용 배열과반복문 배열의초기화 유연성있게배열다루기 한빛미디어

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조 - Part2- 제 2 장다차원배열이란무엇인가 학습목차 2.1 다차원배열이란 2. 2 2 차원배열의주소와값의참조 2.1 다차원배열이란 2.1 다차원배열이란 (1/14) 다차원배열 : 2 차원이상의배열을의미 1 차원배열과다차원배열의비교 1 차원배열 int array [12] 행 2 차원배열 int array [4][3] 행 열 3 차원배열 int array [2][2][3]

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 5 장생성자와접근제어 1. 객체지향기법을이해한다. 2. 클래스를작성할수있다. 3. 클래스에서객체를생성할수있다. 4. 생성자를이용하여객체를초기화할수 있다. 5. 접근자와설정자를사용할수있다. 이번장에서만들어볼프로그램 생성자 생성자 (constructor) 는초기화를담당하는함수 생성자가필요한이유 #include using namespace

More information

17장 클래스와 메소드

17장 클래스와 메소드 17 장클래스와메소드 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 1 / 18 학습내용 객체지향특징들객체출력 init 메소드 str 메소드연산자재정의타입기반의버전다형성 (polymorphism) 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 2 / 18 객체지향특징들 객체지향프로그래밍의특징 프로그램은객체와함수정의로구성되며대부분의계산은객체에대한연산으로표현됨객체의정의는

More information

Microsoft PowerPoint - ch10 - 이진트리, AVL 트리, 트리 응용 pm0600

Microsoft PowerPoint - ch10 - 이진트리, AVL 트리, 트리 응용 pm0600 균형이진탐색트리 -VL Tree delson, Velskii, Landis에의해 1962년에제안됨 VL trees are balanced n VL Tree is a binary search tree such that for every internal node v of T, the heights of the children of v can differ by at

More information

Microsoft PowerPoint - a10.ppt [호환 모드]

Microsoft PowerPoint - a10.ppt [호환 모드] Structure Chapter 10: Structures t and Macros Structure 관련된변수들의그룹으로이루어진자료구조 template, pattern field structure를구성하는변수 (cf) C언어의 struct 프로그램의 structure 접근 entire structure 또는 individual fields Structure는

More information

PowerPoint Template

PowerPoint Template 16-1. 보조자료템플릿 (Template) 함수템플릿 클래스템플릿 Jong Hyuk Park 함수템플릿 Jong Hyuk Park 함수템플릿소개 함수템플릿 한번의함수정의로서로다른자료형에대해적용하는함수 예 int abs(int n) return n < 0? -n : n; double abs(double n) 함수 return n < 0? -n : n; //

More information

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information

PowerPoint Presentation

PowerPoint Presentation 자바프로그래밍 1 배열 손시운 ssw5176@kangwon.ac.kr 배열이필요한이유 예를들어서학생이 10 명이있고성적의평균을계산한다고가정하자. 학생 이 10 명이므로 10 개의변수가필요하다. int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; 하지만만약학생이 100 명이라면어떻게해야하는가? int s0, s1, s2, s3, s4,

More information

PowerPoint Template

PowerPoint Template 설치및실행방법 Jaewoo Shim Jun. 4. 2018 Contents SQL 인젝션이란 WebGoat 설치방법 실습 과제 2 SQL 인젝션이란 데이터베이스와연동된웹서버에입력값을전달시악의적동작을수행하는쿼리문을삽입하여공격을수행 SELECT * FROM users WHERE id= $_POST[ id ] AND pw= $_POST[ pw ] Internet

More information

InsertColumnNonNullableError(#colName) 에해당하는메시지출력 존재하지않는컬럼에값을삽입하려고할경우, InsertColumnExistenceError(#colName) 에해당하는메시지출력 실행결과가 primary key 제약에위배된다면, Ins

InsertColumnNonNullableError(#colName) 에해당하는메시지출력 존재하지않는컬럼에값을삽입하려고할경우, InsertColumnExistenceError(#colName) 에해당하는메시지출력 실행결과가 primary key 제약에위배된다면, Ins Project 1-3: Implementing DML Due: 2015/11/11 (Wed), 11:59 PM 이번프로젝트의목표는프로젝트 1-1 및프로젝트 1-2에서구현한프로그램에기능을추가하여간단한 DML을처리할수있도록하는것이다. 구현한프로그램은 3개의 DML 구문 (insert, delete, select) 을처리할수있어야한다. 테이블데이터는파일에저장되어프로그램이종료되어도사라지지않아야한다.

More information

PowerPoint Presentation

PowerPoint Presentation #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을작성하면서 C 프로그램의구성요소에대하여알아본다.

More information

OCW_C언어 기초

OCW_C언어 기초 초보프로그래머를위한 C 언어기초 2 장 : C 프로그램시작하기 2012 년 이은주 학습목표 을작성하면서 C 프로그램의구성요소 주석 (comment) 이란무엇인지알아보고, 주석을만드는방법 함수란무엇인지알아보고, C 프로그램에반드시필요한 main 함수 C 프로그램에서출력에사용되는 printf 함수 변수의개념과변수의값을입력받는데사용되는 scanf 함수 2 목차 프로그램코드

More information

C++ Programming

C++ Programming C++ Programming 연산자다중정의 Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com 목 차 연산자다중정의 C++ 스타일의문자열 2 연산자다중정의 연산자다중정의 단항연산자다중정의 이항연산자다중정의 cin, cout 그리고 endl C++ 스타일의문자열 3 연산자다중정의 연산자다중정의 (Operator

More information

Microsoft Word - src.doc

Microsoft Word - src.doc IPTV 서비스탐색및콘텐츠가이드 RI 시스템운용매뉴얼 목차 1. 서버설정방법... 5 1.1. 서비스탐색서버설정... 5 1.2. 컨텐츠가이드서버설정... 6 2. 서버운용방법... 7 2.1. 서비스탐색서버운용... 7 2.1.1. 서비스가이드서버실행... 7 2.1.2. 서비스가이드정보확인... 8 2.1.3. 서비스가이드정보추가... 9 2.1.4. 서비스가이드정보삭제...

More information

Microsoft PowerPoint - chap06-5 [호환 모드]

Microsoft PowerPoint - chap06-5 [호환 모드] 2011-1 학기프로그래밍입문 (1) chapter 06-5 참고자료 변수의영역과데이터의전달 박종혁 Tel: 970-6702 Email: jhpark1@seoultech.ac.kr h k 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- ehanbit.net 자동변수 지금까지하나의함수안에서선언한변수는자동변수이다. 사용범위는하나의함수내부이다. 생존기간은함수가호출되어실행되는동안이다.

More information

PowerPoint Presentation

PowerPoint Presentation public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +

More information

JAVA PROGRAMMING 실습 02. 표준 입출력

JAVA PROGRAMMING 실습 02. 표준 입출력 자바의기본구조? class HelloJava{ public static void main(string argv[]){ system.out.println( hello,java ~ ){ } } # 하나하나뜯어살펴봅시다! public class HelloJava{ 클래스정의 public static void main(string[] args){ System.out.println(

More information

제이쿼리 (JQuery) 정의 자바스크립트함수를쉽게사용하기위해만든자바스크립트라이브러리. 웹페이지를즉석에서변경하는기능에특화된자바스크립트라이브러리. 사용법 $( 제이쿼리객체 ) 혹은 $( 엘리먼트 ) 참고 ) $() 이기호를제이쿼리래퍼라고한다. 즉, 제이쿼리를호출하는기호

제이쿼리 (JQuery) 정의 자바스크립트함수를쉽게사용하기위해만든자바스크립트라이브러리. 웹페이지를즉석에서변경하는기능에특화된자바스크립트라이브러리. 사용법 $( 제이쿼리객체 ) 혹은 $( 엘리먼트 ) 참고 ) $() 이기호를제이쿼리래퍼라고한다. 즉, 제이쿼리를호출하는기호 제이쿼리 () 정의 자바스크립트함수를쉽게사용하기위해만든자바스크립트라이브러리. 웹페이지를즉석에서변경하는기능에특화된자바스크립트라이브러리. 사용법 $( 제이쿼리객체 ) 혹은 $( 엘리먼트 ) 참고 ) $() 이기호를제이쿼리래퍼라고한다. 즉, 제이쿼리를호출하는기호 CSS와마찬가지로, 문서에존재하는여러엘리먼트를접근할수있다. 엘리먼트접근방법 $( 엘리먼트 ) : 일반적인접근방법

More information

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning C Programming Practice (I) Contents 변수와상수 블록과변수의범위 수식과연산자 제어문과반복문 문자와문자열 배열, 포인터, 메모리관리 구조체 디버거 (gdb) 사용법 2/17 Reference The C Programming language, Brian W. Kernighan, Dennis M. Ritchie, Prentice-Hall

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

EEAP - Proposal Template

EEAP - Proposal Template 제품 : ArcGIS Desktop 제작일 : 2019 년 03 월 19 일 제작 : 개요 본문서는 ArcGIS 의쿼리식에사용되는일반적인쿼리요소에대한한국에스리 기술문서입니다. 다음내용을통해쿼리식에사용되는연산자에대한을확인할 수있습니다. 쿼리 (Query) 는 ArcGIS 에서피처및테이블레코드의하위집합을선택하는데사용됩니다. ArcGIS 쿼리표현식은표준 SQL 표현식을준수합니다.

More information

Microsoft Word - SAS_Data Manipulate.docx

Microsoft Word - SAS_Data Manipulate.docx 수학계산관련 함수 함수 형태 내용 SIN(argument) TAN(argument) EXP( 변수명 ) SIN 값을계산 -1 argument 1 TAN 값을계산, -1 argument 1 지수함수로지수값을계산한다 SQRT( 변수명 ) 제곱근값을계산한다 제곱은 x**(1/3) = 3 x x 1/ 3 x**2, 세제곱근 LOG( 변수명 ) LOGN( 변수명 )

More information

11장 포인터

11장 포인터 누구나즐기는 C 언어콘서트 제 9 장포인터 이번장에서학습할내용 포인터이란? 변수의주소 포인터의선언 간접참조연산자 포인터연산 포인터와배열 포인터와함수 이번장에서는포인터의기초적인지식을학습한다. 포인터란? 포인터 (pointer): 주소를가지고있는변수 메모리의구조 변수는메모리에저장된다. 메모리는바이트단위로액세스된다. 첫번째바이트의주소는 0, 두번째바이트는 1, 변수와메모리

More information

JAVA PROGRAMMING 실습 08.다형성

JAVA PROGRAMMING 실습 08.다형성 2015 학년도 2 학기 1. 추상메소드 선언은되어있으나코드구현되어있지않은메소드 abstract 키워드사용 메소드타입, 이름, 매개변수리스트만선언 public abstract String getname(); public abstract void setname(string s); 2. 추상클래스 abstract 키워드로선언한클래스 종류 추상메소드를포함하는클래스

More information

C++ Programming

C++ Programming C++ Programming 예외처리 Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com 목 차 예외처리 2 예외처리 예외처리 C++ 의예외처리 예외클래스와객체 3 예외처리 예외를처리하지않는프로그램 int main() int a, b; cout > a >> b; cout

More information

저작자표시 - 비영리 - 변경금지 2.0 대한민국 이용자는아래의조건을따르는경우에한하여자유롭게 이저작물을복제, 배포, 전송, 전시, 공연및방송할수있습니다. 다음과같은조건을따라야합니다 : 저작자표시. 귀하는원저작자를표시하여야합니다. 비영리. 귀하는이저작물을영리목적으로이용할

저작자표시 - 비영리 - 변경금지 2.0 대한민국 이용자는아래의조건을따르는경우에한하여자유롭게 이저작물을복제, 배포, 전송, 전시, 공연및방송할수있습니다. 다음과같은조건을따라야합니다 : 저작자표시. 귀하는원저작자를표시하여야합니다. 비영리. 귀하는이저작물을영리목적으로이용할 저작자표시 - 비영리 - 변경금지 2.0 대한민국 이용자는아래의조건을따르는경우에한하여자유롭게 이저작물을복제, 배포, 전송, 전시, 공연및방송할수있습니다. 다음과같은조건을따라야합니다 : 저작자표시. 귀하는원저작자를표시하여야합니다. 비영리. 귀하는이저작물을영리목적으로이용할수없습니다. 변경금지. 귀하는이저작물을개작, 변형또는가공할수없습니다. 귀하는, 이저작물의재이용이나배포의경우,

More information

ez-shv manual

ez-shv manual ez-shv+ SDI to HDMI Converter with Display and Scaler Operation manual REVISION NUMBER: 1.0.0 DISTRIBUTION DATE: NOVEMBER. 2018 저작권 알림 Copyright 2006~2018 LUMANTEK Co., Ltd. All Rights Reserved 루먼텍 사에서

More information

금오공대 컴퓨터공학전공 강의자료

금오공대 컴퓨터공학전공 강의자료 C 프로그래밍프로젝트 Chap 13. 포인터와배열! 함께이해하기 2013.10.02. 오병우 컴퓨터공학과 13-1 포인터와배열의관계 Programming in C, 정재은저, 사이텍미디어. 9 장참조 ( 교재의 13-1 은읽지말것 ) 배열이름의정체 배열이름은 Compile 시의 Symbol 로서첫번째요소의주소값을나타낸다. Symbol 로서컴파일시에만유효함 실행시에는메모리에잡히지않음

More information

Microsoft PowerPoint - C++ 5 .pptx

Microsoft PowerPoint - C++ 5 .pptx C++ 언어프로그래밍 한밭대학교전자. 제어공학과이승호교수 연산자중복 (operator overloading) 이란? 2 1. 연산자중복이란? 1) 기존에미리정의되어있는연산자 (+, -, /, * 등 ) 들을프로그래머의의도에맞도록새롭게정의하여사용할수있도록지원하는기능 2) 연산자를특정한기능을수행하도록재정의하여사용하면여러가지이점을가질수있음 3) 하나의기능이프로그래머의의도에따라바뀌어동작하는다형성

More information

WINDOW FUNCTION 의이해와활용방법 엑셈컨설팅본부 / DB 컨설팅팀정동기 개요 Window Function 이란행과행간의관계를쉽게정의할수있도록만든함수이다. 윈도우함수를활용하면복잡한 SQL 들을하나의 SQL 문장으로변경할수있으며반복적으로 ACCESS 하는비효율역

WINDOW FUNCTION 의이해와활용방법 엑셈컨설팅본부 / DB 컨설팅팀정동기 개요 Window Function 이란행과행간의관계를쉽게정의할수있도록만든함수이다. 윈도우함수를활용하면복잡한 SQL 들을하나의 SQL 문장으로변경할수있으며반복적으로 ACCESS 하는비효율역 WINDOW FUNCTION 의이해와활용방법 엑셈컨설팅본부 / DB 컨설팅팀정동기 개요 Window Function 이란행과행간의관계를쉽게정의할수있도록만든함수이다. 윈도우함수를활용하면복잡한 SQL 들을하나의 SQL 문장으로변경할수있으며반복적으로 ACCESS 하는비효율역시쉽게해결할수있다. 이번화이트페이퍼에서는 Window Function 중순위 RANK, ROW_NUMBER,

More information

Microsoft PowerPoint - chap10-함수의활용.pptx

Microsoft PowerPoint - chap10-함수의활용.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 중 값에 의한 전달 방법과

More information

歯엑셀모델링

歯엑셀모델링 I II II III III I VBA Understanding Excel VBA - 'VB & VBA In a Nutshell' by Paul Lomax, October,1998 To enter code: Tools/Macro/visual basic editor At editor: Insert/Module Type code, then compile by:

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation

1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation 1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation Board(EVB B/D) 들과 TCP/IP Protocol로연결되며, 연결된 TCP/IP

More information

APOGEE Insight_KR_Base_3P11

APOGEE Insight_KR_Base_3P11 Technical Specification Sheet Document No. 149-332P25 September, 2010 Insight 3.11 Base Workstation 그림 1. Insight Base 메인메뉴 Insight Base Insight Insight Base, Insight Base Insight Base Insight Windows

More information

MAX+plus II Getting Started - 무작정따라하기

MAX+plus II Getting Started - 무작정따라하기 무작정 따라하기 2001 10 4 / Version 20-2 0 MAX+plus II Digital, Schematic Capture MAX+plus II, IC, CPLD FPGA (Logic) ALTERA PLD FLEX10K Series EPF10K10QC208-4 MAX+plus II Project, Schematic, Design Compilation,

More information

ISP and CodeVisionAVR C Compiler.hwp

ISP and CodeVisionAVR C Compiler.hwp USBISP V3.0 & P-AVRISP V1.0 with CodeVisionAVR C Compiler http://www.avrmall.com/ November 12, 2007 Copyright (c) 2003-2008 All Rights Reserved. USBISP V3.0 & P-AVRISP V1.0 with CodeVisionAVR C Compiler

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 3 장함수와문자열 1. 함수의기본적인개념을이해한다. 2. 인수와매개변수의개념을이해한다. 3. 함수의인수전달방법 2가지를이해한다 4. 중복함수를이해한다. 5. 디폴트매개변수를이해한다. 6. 문자열의구성을이해한다. 7. string 클래스의사용법을익힌다. 이번장에서만들어볼프로그램 함수란? 함수선언 함수호출 예제 #include using

More information

(Microsoft PowerPoint - 2\300\345.ppt)

(Microsoft PowerPoint - 2\300\345.ppt) 2 장. ASP 를위한 VBScript 정보처리학과서보원교수 목차 서버스크립트 VBScript 변수 연산자 배열 제어문및반복문 프로시저 문자열함수 1 스크립트언어 간단한프로그래밍언어 인터프리트언어와유사한특성을갖고있음 Script 언어 vs. Programming 언어 표현력 용도난이도 스크립트언어 제한적특정용도쉬움 프로그래밍언어 풍부범용적어려움 VBScript

More information

Microsoft PowerPoint - Perpect C 02.ppt [호환 모드]

Microsoft PowerPoint - Perpect C 02.ppt [호환 모드] 02 C 프로그래밍기초 충남대학교이형주 1 C 프로그램구조 콘솔응용프로그램 2 프로그램실행순서 C 프로그램은여러함수의조합으로구성 함수란정해진규칙에의하여일련의작업을수행하는프로그램의단위 실행순서 main 함수는프로그램이실행되면가장먼저시작되는부분 모든함수내부에서는위에서아래로, 좌에서우로, 문장이위치한순서대로실행 3 전처리기 전처리기 (preprocessor) 미리처리하는프로그램으로,

More information

슬라이드 1

슬라이드 1 UNIT 6 배열 로봇 SW 교육원 3 기 학습목표 2 배열을사용핛수있다. 배열 3 배열 (Array) 이란? 같은타입 ( 자료형 ) 의여러변수를하나의묶음으로다루는것을배열이라고함 같은타입의많은양의데이터를다룰때효과적임 // 학생 30 명의점수를저장하기위해.. int student_score1; int student_score2; int student_score3;...

More information

예제 1.1 ( 관계연산자 ) >> A=1:9, B=9-A A = B = >> tf = A>4 % 4 보다큰 A 의원소들을찾을경우 tf = >> tf = (A==B) % A

예제 1.1 ( 관계연산자 ) >> A=1:9, B=9-A A = B = >> tf = A>4 % 4 보다큰 A 의원소들을찾을경우 tf = >> tf = (A==B) % A 예제 1.1 ( 관계연산자 ) >> A=1:9, B=9-A A = 1 2 3 4 5 6 7 8 9 B = 8 7 6 5 4 3 2 1 0 >> tf = A>4 % 4 보다큰 A 의원소들을찾을경우 tf = 0 0 0 0 1 1 1 1 1 >> tf = (A==B) % A 의원소와 B 의원소가똑같은경우를찾을때 tf = 0 0 0 0 0 0 0 0 0 >> tf

More information