[Ch...] Posted Wednesday at 12:52 PM Share Posted Wednesday at 12:52 PM Also when you click LOOP there is an option for PARAMETER there, there should be where to insert PCM that gets run before or after the LOOP. Glad to hear it worked for you. Link to comment Share on other sites More sharing options...
[Se...] Posted yesterday at 07:17 AM Author Share Posted yesterday at 07:17 AM Please sign in to view this quote. Please sign in to view this username. The loop runs, but I can't get different behavior for the first second loops. I tried the logic shown in the image, but iit doesn't seem to wok properly. Link to comment Share on other sites More sharing options...
[Ma...] Posted yesterday at 07:39 AM Share Posted yesterday at 07:39 AM (edited) Wouldn't be condition to end loop with AND instead of OR? And there should be exit condition for no more than 3 passes - or it will run indefinitely. And don't forget to first initialize variable "measureCount" as ZERO before "repeat" Edited yesterday at 07:51 AM init measureCount Link to comment Share on other sites More sharing options...
[Se...] Posted 21 hours ago Author Share Posted 21 hours ago (edited) Please sign in to view this quote. Hi, Please sign in to view this username. thanks again for your help earlier. I have one more question. In my current setup, I defined a loop with 2 repetitions directly in the characteristic settings (using Calypso's built-in loop function). At the same time, I declared a variable measureCount = 0 and increased it inside a PCM repeat block using measureCount = measureCount + 1. What I'm not sure about is whether this variable (measureCount) actually reflects the number of measurement attempts within the characteristic loop. For example, when measureCount == 1, does that really mean it's the first measurement attempt? Also, I’ve noticed that different people use different variable names in examples — like A, LOOP, or measureCount. Does Calypso internally recognize these as special loop counters, or is it entirely up to how we define and use them in PCM? One more thing — I ran into a strange issue. When the first measurement fails (i.e., one of the results is out of tolerance), I expect only NOK_1 to be triggered. But instead, both NOK_1 and NOK_2 are being executed in the same loop cycle. It seems like multiple goto statements are being activated even though only one failure should occur at that point. I'm not sure if it's a PCM behavior or a mistake in my logic. I'm still learning how PCM interacts with characteristic-based loops, so I’d really appreciate your insight. Thanks in advance! Edited 21 hours ago Link to comment Share on other sites More sharing options...
[Ma...] Posted 20 hours ago Share Posted 20 hours ago So to your first question: People are using different names for variables, because the name is irrelevant - just use name which describe it's value, or what's used for. Potential problem can be with unclosed labels statements ( NOK_1, NOK_2 ) which can lead to displaying both messages. Perhaps you can add "goto NEXT" after showing message. I also have no experience in PCM and manual is not helpfull with basic syntaxes. In posted code you can be sure that with value measureCount as 1 is indeed first loop. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in