You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old June 6th, 2007, 04:49 AM   #1
mulderm
Member
Netherlands

mulderm is offline
 
Join Date: Jun 2003
Location: Netherlands
Posts: 273
V-, M- and L-memory for S7-200

Hello,

I programming Step7 Microwin for S7-200 plcīs.
What are the difference between V-,L- and M-memory and what will be the best option?

Greetings,

mulderm
__________________
Netherlands
  Reply With Quote
Old June 6th, 2007, 05:28 AM   #2
dchartier
Member
Canada

dchartier is offline
 
Join Date: May 2003
Posts: 1,539
Hello Mulderm;

From the best source I know, the manual S7-200_e.pdf:

Accessing Data in the Memory Areas

Variable Memory Area: V

You can use V memory to store intermediate results of operations being performed by the control logic in your program. You can also use V memory to store other data pertaining to your process or task. You can access the V memory area in bits, bytes, words, or double words:

Bit: V
[byte address].[bit address] V10.2

Byte, Word, or Double Word: V
[size][starting byte address] VW100



Bit Memory Area: M

You can use the bit memory area (M memory) as control relays to store the intermediate status of an operation or other control information. You can access the bit memory area in bits, bytes, words, or double words:

Bit: M
[byte address].[bit address] M26.7

Byte, Word, or Double Word: M
[size][starting byte address] MD20



Local Memory Area: L

The S7-200 provides 64 bytes of local memory of which 60 can be used as scratchpad memory or for passing formal parameters to subroutines.

Tip

If you are programming in either LAD or FBD, STEP 7--Micro/WIN reserves the last four bytes of local memory for its own use.

Local memory is similar to V memory with one major exception. V memory has a global scope while L memory has a local scope. The term global scope means that the same memory location can be accessed from any program entity (main program, subroutines, or interrupt routines). The term local scope means that the memory allocation is associated with a particular program entity.
The S7-200 allocates 64 bytes of L memory for the main program, 64 bytes for each subroutine nesting level, and 64 bytes for interrupt routines.

The allocation of L memory for the main program cannot be accessed from subroutines or from interrupt routines. A subroutine cannot access the L memory allocation of the main program, an interrupt routine, or another subroutine. Likewise, an interrupt routine cannot access the L memory allocation of the main program or of a subroutine.

The allocation of L memory is made by the S7-200 on an as-needed basis.


Hope this helps,
Daniel Chartier
  Reply With Quote
Old June 6th, 2007, 10:57 AM   #3
mulderm
Member
Netherlands

mulderm is offline
 
Join Date: Jun 2003
Location: Netherlands
Posts: 273
Thank you Daniel for this information!

mulderm
__________________
Netherlands
  Reply With Quote
Old November 26th, 2015, 05:46 PM   #4
Petr_Broza
Member
Canada

Petr_Broza is offline
 
Join Date: May 2015
Location: Vancouver
Posts: 34
Great answer. And is there any difference between V and M?
  Reply With Quote
Old November 27th, 2015, 06:03 AM   #5
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,292
There is a lot more V memory than M. So generally you will use M memory for bits and V memory for all other variables. It isn't a rule but it makes reading the programme more logical. You have M0.0 to M31.7 available which is 32 bytes and depending on the PLC version from 4096 to 24576bytes of V memory. Unlike some PLCs the V memory isn't limited to the data types it can hold, you can put any type of data in to it, but it is up to you to make sure you don't write a Real and then read it as a Double Int. Or any other combination that will give you bad data.
  Reply With Quote
Old November 27th, 2015, 01:38 PM   #6
Petr_Broza
Member
Canada

Petr_Broza is offline
 
Join Date: May 2015
Location: Vancouver
Posts: 34
Ok, thanks. I was surprised when I opened S7 MicroWin and discovered, that it is completed different from Simatic S7.
  Reply With Quote
Old November 28th, 2015, 06:32 AM   #7
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,292
Don't quote me on this, it is from long term memory. The S7-200 range wasn't originally developed by Siemens, it was a Texas Instruments device, that part of Texas Instruments were then bought by Siemens.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:39 AM.


.