[r295]: / trunk / Library / POUs / Functions / LOGSTR / svnobj  Maximize  Restore  History

Download this file

4 lines (4 with data), 4.6 kB

Gx_lÉ!0…jüo
IŃCE_GŠSystem.StringL{6f9dac99-8de1-4efc-8465-68ac443b7d08}SpecialFuncL{0db3d7bb-cde0-4416-9a7b-ce49a0124323}NoneImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocument	L{f3878285-8e4f-490b-bb1b-9acbb7eb04db}
TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagTextViCharPos := Standard.FIND(msgFmtStr, '%s');*IF iCharPos = 0 THEN 	RETURN; END_IFN// add message to registered Device LogtsText := Standard.REPLACE(msgFmtStr, strArg, 2, iCharPos);>IF LEN(stext) > uiMaxSize THEN	†	// log the right side of the message first (be carefull of offset)¸	GVL_System._CmpCfLog.AddLogEntry(msgCtrlMask, 0, 0, RIGHT(sText, (LEN(sText)-uiMaxSize)) );,	// then the left sideœ	GVL_System._CmpCfLog.AddLogEntry(msgCtrlMask, 0, 0, LEFT(sText, uiMaxSize) );ELSEx	GVL_System._CmpCfLog.AddLogEntry(msgCtrlMask, 0, 0, sText);InterfaceL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94} (* !–    Adds a message to the log, if the message is longer then 127 characters"–    ithe entry splits into two log messages (max 255 chars = 2 log entries)#$    Usage example:$Ž    LOGSTR( msgCtrlMask := UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ), %V		    msgFmtStr := 'Ammount of tests : %s',&:			strArg := uiTestAmmount );'	(P    results into the following logstring):        Ammount of tests : 3 **)+,FUNCTION LOGSTR : DINT,VAR_INPUT-Ž	msgCtrlMask : DWORD; // use UDINT_TO_DWORD( CmpLog.LogClass.LOG_.... ).ˆ	msgFmtStr : T_MaxString; // Usage example: ' Ammount of tests : %s'/l	strArg : T_MaxString; // Usage example: uiTestAmmount0END_VAR1VAR26	uiMaxSize : USINT := 127; 3*	sText : T_MaxString;4 	iCharPos : INT;5"UniqueIdGenerator61367POULevel8L{8e575c5b-1d37-49c6-941b-5c0ec7874787}9Standard: ChildObjectGuids;8System.Collections.ArrayList<,AddAttributeSubsequent=boolĐĐ-ĐĐ	E
ĐĐ
­XÚĐ-ĐĐ
­YÚĐ-ĐĐ
­ZÚĐ-ĐĐ
­[ÚĐ-ĐĐ
­\ÚĐ-ĐĐ
­dÚĐ-ĐĐ
­]ÚĐ-ĐĐ
­^ÚĐ-ĐĐ
­kÚĐ-ĐĐ
­jÚĐ-ĐĐ
­vÚĐ-ĐĐ
­wÚĐ-ĐĐ
­xÚĐ-ĐĐ
­lÚĐ-ĐĐ
­oÚĐ-ĐĐ
­cÚĐ-ĐĐ
­ÚĐ-ĐĐ	E
ĐĐ
­`ÚĐ- ĐĐ
­†ÚĐ-!ĐĐ
­ˆÚĐ-"ĐĐ
­…ÚĐ-ĐĐ
­{ÚĐ-#ĐĐ
­}ÚĐ-$ĐĐ
­~ÚĐ-%ĐĐ
­€ÚĐ-&ĐĐ
­ÚĐ-'ĐĐ
­ƒÚĐ-(ĐĐ
­‚ÚĐ-)ĐĐ
­|ÚĐ-*ĐĐ
­DÚĐ-+ĐĐ
­EÚĐ-,ĐĐ
­FÚĐ--ĐĐ
­GÚĐ-.ĐĐ
­HÚĐ-/ĐĐ
­IÚĐ-0ĐĐ
­JÚĐ-1ĐĐ
­tÚĐ-2ĐĐ
­KÚĐ-3ĐĐ
­LÚĐ-4ĐĐ
­MÚĐ-0ĐĐ
­ÚĐ-Đ5-6Đ78-9:;Đ<=­