2 Questions(s7-200)

DIMPOL

Member
Join Date
Oct 2002
Posts
24
// on the first scan, call subroutine 0
LD SM0.1
CALL SBR_0


NETWORK 1 // Subroutine 0
LD SM0.0
MOVB 100 SMB34 // Set the interval for the timed interrupt 0 to 100 ms
ATCH INT_0 10 // Attach timed interrupt 0 (Event 10) to INT_0
ENI // Global interrupt enable



NETWORK 1 // Interrupt 0
// Read the value of AIW4 every 100 ms

LD SM0.0
MOVW AIW4 VW100

I think it is wright, but if i want to measure the AIW4 every 5 seconds what shall i do?

Because SMB34 Timed Interrupt 0: Time interval value (in 1 ms increments from 1 ms to 255 ms).

2nd question

How can i store 1000 values of AIW4 every 5 sec?

p.s: sorry for my English

bye
 
Depends on your model I think but Event 21 would allow you to use T32 which can go as high as 32.767 seconds. Or you could allow the interrupt routine to update the VW100 every 1/4 sec (250 ms) then use another timer to Add to Table every 5 secs, Add to Table will allow you 100 entries excluding the parameter specifications.
 

Similar Topics

Question for the Siemens gurus here. We have one stand-alone piece of equipment that is running an S7-1200 processor. The manufacturer has...
Replies
4
Views
2,381
Hi Everyone, First Project with Siemens and I need to communicate via RS-485 to a Tank Level Hub using Modbus RTU. I will be using the CB 1241...
Replies
13
Views
3,790
Greetings, I am an Allen-Bradley programmer who has an opportunity to work with some Siemens equipment (S7-1200). The discreet stuff is pretty...
Replies
7
Views
2,778
Hello guys, I'm currently blessed (not really) with a new project upgrade to add to my never ending lists of to do's. I was requested to upgrade...
Replies
0
Views
1,408
Hi everyone! I am new to PLCs and need some help. I can brute force my way through the ladder logic, but the actual PLC installation & wiring...
Replies
2
Views
1,573
Back
Top Bottom