--- a
+++ b/trunk/PWMMods/SoftPWM/svnobj
@@ -0,0 +1,6 @@
+Gx_l!0…jüoJÓsT™Nj£aSystem.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
longTagTextj(* If current task is not, yet, determined, get it *)TIF hTask = SysTask.RTS_INVALID_HANDLE THENN	SysTask.SysTaskGetCurrent(ADR(hTask));END_IF\(* if task is determined, adjust next cycle *)VIF hTask <> SysTask.RTS_INVALID_HANDLE THEN	IF xPWM THENÂ		ulInterval := LREAL_TO_DWORD(dwFrequ * (LREAL#1000000 / DWORD_TO_LREAL(dwFrequ)) * rDutyCycle);
+	ELSEÚ		ulInterval := LREAL_TO_DWORD(dwFrequ * (LREAL#1000000 / DWORD_TO_LREAL(dwFrequ)) * (LREAL#1 - rDutyCycle));	END_IF^	SysTask.SysTaskSetInterval(hTask, ulInterval);"xPWM := NOT xPWM;InterfaceL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94} l/// This FB can be used to implement a Soft PWM, based!N/// on the scheduler of a Linux system."///#l/// Note, that this function block should be used in a$n/// a high priority task. The interval of the task will%,/// constantly change.&,FUNCTION_BLOCK SoftPWM'VAR_INPUT("	dwFrequ : DWORD;)&	rDutyCycle : REAL;*END_VAR+VAR_OUTPUT,	xPWM : BOOL;-VAR.|	hTask : SysTask.RTS_IEC_HANDLE := SysTask.RTS_INVALID_HANDLE;/&	ulInterval: DWORD;0"UniqueIdGenerator1412POULevel3L{8e575c5b-1d37-49c6-941b-5c0ec7874787}4Standard5 ChildObjectGuids68System.Collections.ArrayList7,AddAttributeSubsequent8boolÐÐ-ÐÐ	E
+ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ ÚÐ-ÐÐ
­!ÚÐ-ÐÐ
­"ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­	ÚÐ-ÐÐ	E
+ÐÐ
­#ÚÐ- ÐÐ
­$ÚÐ-!ÐÐ
­%ÚÐ-"ÐÐ
­&ÚÐ-#ÐÐ
­'ÚÐ-$ÐÐ
­)ÚÐ-%ÐÐ
­ÚÐ-&ÐÐ
­ÚÐ-'ÐÐ
­
+ÚÐ-(ÐÐ
­ÚÐ-)ÐÐ
­ÚÐ-*ÐÐ
­ÚÐ-+ÐÐ
­ÚÐ-,ÐÐ
­ÚÐ-*ÐÐ
­ÚÐ--ÐÐ
­ÚÐ-.ÐÐ
­ÚÐ-/ÐÐ
­ÚÐ-*ÐÐ
­ÚÐ-Ð0-1Ð23-456Ð78­