Step 7 v5.4 (Not v6.0) Comparator instruction help.

Tharon

Member
Join Date
Jan 2007
Location
Other
Posts
1,430
I'm trying to learn how to use the Comparator instructions in Step 7.

I made a Timer (S_ODT) and created a word for the BI output MW47 and made a symbol for it called "T47.ACC"

I then tried to use this value to in a LE_I instruction. For IN1 of the LE_I instruction I used MW47. But I get a "Type conflict with entry in the symbol area." error.

I try again with a different symbol "MW47" just for simplicity. I still get the same error. I try a fresh word, and don't assign a symbol to it, and I don't get an error.

Can I not use words with symbols when trying to use the comparator instructions?


---attachments deleted by phil---
 
Last edited:
You got STEP7 v6.0 ! Hey I only have v5.4 and I even have a software update contract.

Anyway, the "I" in the instruction you want to use means that it expects the compare value to be an INT. So you cannot use a WORD or an S5TIME variable with this instruction. Silly Siemens, the format of the BI output is WORD, not INT which would have made more sense.
This is a typical problem with the S5 timers. There are two ways to get past the type checking.
Program the compare in STL, not LAD or FBD.
Or disable typechecking altogether under the options. (I do not recommend this).
 
Oops, sorry.

Step 7 is v5.4
Protool is v6.0

A little mix up on my part there. I just remembered the v6.0 when I installed both and didn't think beyond that.

I figured it was because of the INT and WORD deal, but when I changed the data type to INT, it errored on the Timer instruction. :)
 
You can always use the move instruction which will work on all types for the source/destination with type checking on e.g.

view5.JPG
 
Just a warning. I would edit the links out of my original post, but I think the edit time window is closed.

Those links are to an image host that uses ads. I opened them and got a few questionable ads (Some that could be NSFW, (Not Safe for Work).

I thought clicking the "Safe for Work" option on the upload site would make it safe, but apparently not. I used the image host because most sites don't like a lot of attachments and such clogging up their forums.

Again, just a warning since I can't edit my post anymore.
 
Tharon said:
Just a warning. I would edit the links out of my original post, but I think the edit time window is closed.

Those links are to an image host that uses ads. I opened them and got a few questionable ads (Some that could be NSFW, (Not Safe for Work).

I thought clicking the "Safe for Work" option on the upload site would make it safe, but apparently not. I used the image host because most sites don't like a lot of attachments and such clogging up their forums.

Again, just a warning since I can't edit my post anymore.

I deleted the links. Include them in your post, if you wish.
Enjoy,
 
I would develop my own FC that brings in the value and INT value to compare. Converts and compares the two values generating result. Seeing as your using S7 Timers you'll probably need this more than once.

Nick

I Second and third the motion. Use IEC timer. You'll thus stay clear of silly BCD or HEX values. I'm hoping that in S9 (or what ever they call the next version) they include IEC Timers in standard instruction set and possibly lose the BCD values for ODT.
 

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
175
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
248
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
547
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
673
Back
Top Bottom