encoder --> s7-1200

The CPU stores the current value of each HSC in an input (I) address...
HSC1 - ID1000,HCS2 - ID1004......

In HSC configuration You can generate interuption for these events - CV=PV: 6 max.
or Direction changed: 6 max. or External reset: 6 max.,
But read it again....it is writen there and more You must read about interuptions as well.
 
yea i just cant find out how to get the output out of the HCS and into the acual program. anyone know how?

greetz sord
 
IF "ID1000" = 180 THEN "Q.0.0" (*for exampe*) := true;
END_IF;

or set output or whatever You want to do in interrup OB You generated before...
 
aha ok but thats in code line how do i get this to work in LAD?

PS: working at a company new to all this and where all learning about this here right now dont mind our stupidness XD

greetz sordfich
 
Last edited:
yes and my question has been for about 3 posts now HOW i do that XD not with what or why just HOW XD

so how do i get:

IF "ID1000" = 180 THEN "Q.0.0" (*for exampe*) := true;
END_IF;

this into a LAD and working what kinda function do i need for a S7-1200 in step 7?

greetz sord
 
Hello ,

Basically encoder will give u pulses for one rotation say 360 pulses for 1 rotation then you calculate how much is the displacement occur in 1 rotation.say 5 mm then 360 pul = 5 mm

ok
now you want displacemrnt of 40mm then calculate and

in high speed compare inst give that pulses .please see format of high spd compare inst for details.
 
sorry to say sunil but i know what you are saying i am asking for the FUNCTION in STEP 7 i need to use to get the ID1000 to work.

greetz sord
 
Compararor operations --- for examle Cmp== Equal then compare ID1000 to some value...but First of all You must enable Your counter in Cpu hardware configuration,choose a mode of counter and so on...if You want to use interuruptions generate them... Watch table can be used to monitor HSC...
 
ok i have the hcs enabled and everything set up in my program i have a comp>= to compare the id1000 to 1 but i am getting no response from the counter and i cant check its counting value in anywhere anyone have any tips?

edit: colegeus just showed me that you can monitor the hcs and it isent moving.

greetz sord
 
Last edited:
To explain it simply...You do not need any program to monitor HSC...Use Watch table with ID1000 /HSC1/ , display format DEC signed,monitor/go online/,put some pulses on Input or inputs You see in configuration/do need to connect incremental,use any pushbutton/.....by the way,I hope You put the configuration in Your CPU...You have choosen right type of HSC and You connect incremental with right outputs type....
 
yea i have the right outputs from the encoder its just that the counter isent moving i am geusing its just something random i forgot just gonna browse the program for a while and see if i can get any flaws. thx for the help btw.

greetz sord
 
hi i think i found a fault.

the HCS is giving of the 80A1 fault code. siemens's book of evil tells me that the hcs identifier does not adress a hcs but what dus this mean and how do i solve it?

greetz sord
 
I think you get this if you don't convert the hardware identifier to hex.

In the HSC Properties you have a hardware identifier, for example, I have one that's 262.

On the CTRL_HSC instruction's HSC pin I have W#16#106. The 106 is just the hex value for a decimal 262.

For the start address of ID1000, if you want to see it in the program, just use a move command. Put ID1000 into the left hand side and just use a currently unused memory double word (i.e. MD100)on the other side of the move command. You'll be able to see the output of the HSC when you monitor the block.
 
ok yea ive got everything set up right now but i am not seeing a counting value it stays on 0 whatever i do with the encoder. forwards backwards dusent matter. all the id's avalible for this HCS are staying on 0 (ID1000-ID1003).
anyone have any idea what this can be. and why are these things so dificult to set up? arent there far more easy ways?

greetz sordfich

edit: if anyone has a sample program for an incremental encoder i would love to see it.
 

Similar Topics

Hi Folks. Has anyone used an SEW EI7C encoder with an S71200 PLC? If yes, how is it done? I use this same encoder in EI76 mode with a...
Replies
0
Views
269
hello every one, I have a project in with S7 1200 PLC. the system has one conveyor "collector" and 3 injection conveyors. the collector has an...
Replies
5
Views
1,914
Hi, I have a P+F EVS58-PN encoder attached to my S7-1200 in TIA Portal V15. I have my GSD file installed and the device is setup in TIA...
Replies
2
Views
1,938
I want to use 24vdc encoder with an existing micrologix 1200 PLC, The plc inputs are 120vac, I need 120vac for my other inputs. So is there any...
Replies
10
Views
2,533
I want to use 24vdc encoder with an existing micrologix 1200 PLC, The plc inputs are 120vac, I need 120vac for my other inputs. So is there any...
Replies
4
Views
1,507
Back
Top Bottom