Skip to main content
1-Visitor
January 21, 2014
Question

Programming loop issue. Prime 2 works, Prime 3 does not

  • January 21, 2014
  • 2 replies
  • 1985 views

I have a problem with programming in the attached file. I created this file in Prime 2 back in May 2013, and have been using it ever since to determine component values. In December, I also installed Prime 3. The programming loop of the file computes the period / frequency at which the output voltage equals a certain value Vgassing. I start the programming loop with the frequency 1Hz above resonance which will give me a huge output voltage. I then increment the frequency 0.1Hz until the output voltage drops to equal Vgassing. When I open the file in Prime 2, the file computes the period / frequency perfectly. If you change the input voltage Vac at the top of the page from 435V to 450V, you will see the frequency rise at the bottom of the page. When I open the file in Prime 3, it does not give me a value from the programming loop. If you change the input voltage Vac from 435V to 450V at the top of the page, the program just gives me a value of 0 for Ts. What do I have to do different for Prime 3 than I do for Prime 2 to make this programming loop work? Thanks.

2 replies

1-Visitor
January 21, 2014

Wow, this looks like a bug! I'm forwarding to R&D.

25-Diamond I
January 21, 2014

Roger Yeh wrote:

Wow, this looks like a bug! I'm forwarding to R&D.

Yes, it look s like at least two worksheet variables (see my other post) are not recognized as existing worksheet variables and so are treated as local variables which default to zero.

25-Diamond I
January 21, 2014

Thats strange - I would call it a Prime3 bug and you should open a call and report it to PTC.

The file you sent is in Prime 2 format and so I was able confirm what you have reported - it works in P2 and fails in P3.

In P3 at least two variables are treated as being zero inside the program block - therfore the wrong result 0. I am not sure what the problem is - labelling or the units.

But if you redifine these two variable at the top of the program P3 yields the same results as P2. I must confess that I don't really know why this trick works and it should not be necessary. Its also unclear why its not necessary for the other global worksheet variables used in your program. The attached file is in P3 format.

21.01.png

1-Visitor
January 22, 2014

A huge thanks for the help.