
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
Hello, I have seen your conversation on the other discussion board especially made for CControl 1 V2.0. Well, changing a manual is much easier than looking for the bug and to fix it. Now I was searching the data base there and found already some comments regarding the SGN function where no manual was intended to be aligned. Fazit: The "V2.0" adder means much more hard work and sleepless nights than anyone could think. It doesn't matter if the SGN needs a new manual or if it has a bug. "V2.0" is not a solution for my projects. I stay with CControl1.1 and consider to discover OM versions. By the way, the example I made below contains a bug (unfortunately I don't have an excuse): "IF C < 0 THEN GOTO Kleiner_Null" must be "IF sw_Function1_Return < 0 THEN GOTO Kleiner_Null" Kind regards, MaPi > > Just an addendum as a result of my recent work: > > I just found out that the SGN function in CControl 1 V2.0 does not work correctly. > > When evaluating a positive number, for example SGN(5), the function replies (0) instead of (1). > > I made a workaround with some IF THEN lines as shown below: > > > > 'ROUTINE ALS ERSATZ DER DEFEKTEN SGN-FUNKTION > > 'in > > #Signum_Funktion > > IF C < 0 THEN GOTO Kleiner_Null > > IF sw_Function1_Return = 0 THEN GOTO Gleich_Null > > IF sw_Function1_Return > 0 THEN GOTO Groesser_Null > > #Kleiner_Null > > sw_Function1_Return = -1 > > RETURN > > #Gleich_Null > > sw_Function1_Return = 0 > > RETURN > > #Groesser_Null > > sw_Function1_Return = 1 > > RETURN > > > > MaPi |
| Antwort schreiben |