Step 7 sin function

barryoc

Lifetime Supporting Member
Join Date
Nov 2009
Location
Kilkenny
Posts
148
Hi everyone,

I'm having an issue with sin in step7. I tested the code in plcsim and it works fine. When i download it to the actual cpu it doesn't. I'm thinking it's something to do with an old cpu (315-2ag10). Attached is a screen shot of the code. As soon as it reaches sin it returns 7f800000.

Any help greatly appreciated.

Regards,
Barry.

Sin.jpg
 
Similar results with a 317
Given that the SIN algorithm keeps subtracting (2*pi) from the number until it is less than (2*pi), very large floating point numbers will eventually run out of resolution and fail.
Check the CC codes after the SIN

sina.JPG
 

Similar Topics

I am having a step7 v5.4 program where the blocks are encrypted and locked. And the manufacturer is stopped the support. Is there any ways to...
Replies
2
Views
173
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
245
HI! HOW COULD I OBTAIN THE NAMES OF THE STEPS OF A ROUTINE IN SFC LANGUAGE IN STUDIO5000? Or is there a system variable that gives me those...
Replies
0
Views
339
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
546
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
666
Back
Top Bottom