SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
Augmented matrix - unexpected SMath behaviour
  Rank: Member Groups: Registered
Joined: 05/10/2016(UTC) Posts: 22   Was thanked: 2 time(s) in 2 post(s)
|
Dear all, I'm currently writing a basic cam profile generation program in SMath, see attachment below. Today, I encountered a behaviour I can't explain: * On the last page, I create some X and Y values * For some reason, the calculated values in the augmented XY matrix are not correctly calculated However, calculation is correct when I add an extra field that has nothing to do with the actual calculation (field marked in red) What happens here? * SMath error? * Programming error on my side? Thanks in advance for any feedback, I love SMath and I would like to finish the program. Kind regards from Belgium, Jan Cam engine - problem.sm (74kb) downloaded 15 time(s).
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,319  Was thanked: 796 time(s) in 504 post(s)
|
Hi Jan. The problem is that SMath try to eval functions starting with if to true or false. You can prevent that behavior with line( ), as in the attached. Cam engine - problem.sm (74kb) downloaded 20 time(s).Best regards. Alvaro.
|
 1 user thanked Razonar for this useful post.
|
|
|
  Rank: Member Groups: Registered
Joined: 05/10/2016(UTC) Posts: 22   Was thanked: 2 time(s) in 2 post(s)
|
Hi Alvaro,
Thank you very much for your feedback! This is certainly something I wouldn't have discovered by myself: muchly appreciated!
p.s. the program isn't ready: the formulas at the last page don't create the required cam profile yet, working on it ;-)
Kind regards,
Jan
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
Augmented matrix - unexpected SMath behaviour
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.