"Can anyone help me" sister thread

Sorry for the confusion here
I changed the orignal program supplied by you with new address of the bit bFlasher to DIX8.0 from orignal DIX2.0.

But what i really want to just confirm is that when we write CDB before any reference to bit bFlasher will it not change to DB from IDB
That is before CDB its DIX2.0 and after CDB its DBX2.0?
 
Any reference to bFlasher will always use DIX2.0 from the currently open instance DB.
All CDB does is swap the currently open global DB and instance DB numbers.
 
Iam sorry L D[AR2,P#0.0]
But still not able to picturize the CDB instruction.

What I was thinking that contents of referred DB will become contents of IDB, and contents of IDB will become contents of DB.

But if this is not so then what actually happens in swapping procedure??

In reference to the first picture of post#28, at very moment of using CDB the value of 1 is shifted from DB2(Global DB) to DB1 (Instance DB).Values swapped and this is what CDB does.
After this when we refer to bit bFlasher OB121 is called upon.


OK but what this 1 means? Does it means now DB2 is now no longer being referd to? But this seems to contradict with calling of OB121, because bFlasher is part of DB1 only and we are refering to it only then why error !!




:oops:
 
This is a quick program I made to illustrate what CDB does.
I hope this answers some of your questions.

If you figure out why DB1.DBX2.0 is never set, you will have the answer.
 
Last edited:
Hi there
So Db1.dbx2.0 is never set !! And thats because of CDB.
But B2.Dbx2.0 to Db14.dbx2.0 does set/reset, and in all the global DB's bits are not defined !!
So CDB does maps the contents of IDB to DB.

And If in OB35 if I change L 2 to L 1
then DB1.Dbx2.0 does set/reset.So when MW200=1 then CDB losses its menaing.

Am I right in all the above statements?
 
Last edited:
Yep.
It only maps to the opened DB.
The instruction itself doesn't change the contents on the DB's. It only maps to another DB.

When MW200=1 then the open DB would be DB1, but the instance DB is also DB1, so if you switch them or not, in the end it doesn't matter. Thus CDB indeed loses its meaning.

Hope this clears things up for you....
 

Similar Topics

I have an old Sentry Palletizer (S/O Number 3007 / Serial Number 1172) that has lost its program as the backup battery died years ago. I can...
Replies
0
Views
164
this a program to send data to barcode printer I want to integrate a new printer in a new machine and i wanted to adapt the old prgram on it but I...
Replies
4
Views
206
I have an old PLC (circa 2007) consisting of Telemecanique/Modicon/Schneider Electric devices. The system has developed errors and unfortunately...
Replies
2
Views
299
Replies
49
Views
10,941
Hello, I am trying to figure out how to create / write / delete a .csv file on the SD card of an Allen Bradley PLC. There is a sample project...
Replies
1
Views
1,451
Back
Top Bottom