S7 1200 DB to store a bit

Join Date
Nov 2011
Location
Ireland
Posts
182
Hello,

I have a signal from a switch on my PLC. The signal is either 1 or 0. i want to store the current value of the switch in a DB block.

I have currently set up a DB to store a DWord and it works fine. However when i set up a new DB to store the switch signal i was not successful. Do i use the data type as "Bool" in the DB block?

Also I cannot use a MOVE block to move the 1 or 0 signal to the DB? Any help would be much appreciated
 
Yes to store the state of a bit, you need a bool data type in the DB.
A MOV is used to a move a byte, word or dword not a bit. To move a bit use the bit level instructions.
 
You might want to look at using M memory rather than DB memory for 'bit' signals. Then you won't need a 'Move' instruction you will just to a contact to operate a coil. The lower values in M memory can be made retentive if needed.
 

Similar Topics

I'm trying to figure out a way to store real numbers in Micrologix 1200. The LIFO & FIFO instructions won't allow me to use Floating values so I'm...
Replies
15
Views
3,814
Hello, dose anyone know how I could store a value from a HSC for a short period of time e.g 60sec and then use this value for a calculation Also...
Replies
2
Views
2,420
Hi, I have attached herewith one image which our programmer has been used in S7 1500 PLC. Now we need to use the same instructions in S7 1200 PLC...
Replies
4
Views
111
commentaire communiqué siemens s7-1200 avec vfd delta ? (cablage et sur tia portal )
Replies
0
Views
81
Hi, I have a 1214 on ip 192.168.0.100. This is connected to other modules through a switch on same network. I need to connect this to a company...
Replies
1
Views
140
Back
Top Bottom