
adccommunitymod (AutomationDirect) asked a question.
Created Date: March 22,2016
Created By: colepc
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I have about 20 inputs for my program. While doing bench testing I use overrides for those 20 inputs. Every time I stop running the PLC, the overrides either stop working or they completely disappear. How can I save the overrides so that I don't have to keep typing them over and over again? And why does it default to "Cancel " so that when I push the "Enter " key it throws away why I typed? And why do I have to keep pushing "Add " for each one, that is, why can't it assume I have several I want to add?
Created Date: March 22,2016
Created by: colepc
Oh, I forgot to add: Why does it allow me to enter in all 20 overrides while the PLC is in program mode only to discover that they are all useless as they won't work when the PLC is placed in run mode?
Created Date: March 22,2016
Created by: Do-more PE
A better method than using overrides is to map your IO to internal memory and then use the internal memory in your main code.
At the top of your program, map X0 to some Internal bit, say C0. X1 to C1, etc.
STR X0
OUT C0
STR X1
OUT X1
At the bottom of the program do the same thing. C100 to Y0, C101 to Y1, etc.
STR C100
OUT Y0
STR C101
OUT Y1
In your code, use these internal bits in place of X0, X1, Y0, Y1. This way if you need to "override " something, you disable one rung of logic for the physical IO and then just toggle the "C " bit using a dataview.
Created Date: March 23,2016
Created by: colepc
Thanks for the tip about using "Data View ". I had already used conversion logic from real world inputs and outputs in my program using pseudo "C " input/output bits because I wanted the real world inputs and outputs to be easy to replace should they become defective. My next problem was understanding "Data View ". Chapter 10 in the "DirectSOFT 6 Programming Software User Manual " has a very good discussion about "Data View ". This is what I discovered:
1. "Data View " cannot be used to "force " bits like "overrides " can.
2. "Data View " cannot be used for real world inputs and outputs because they are almost immediately updated by the PLC.
3. "Data View " can be used to send status changes to the PLC as one shots. These one shots last for one scan or less.
4. Telling "Data View " to change the status of "C " bits uses "ON/OFF " buttons in the "Edits " column. The pushing of the "ON/OFF " buttons is slight and not very noticeable. In essence you have to remember if you pushed "ON " or "OFF ".
5. As was suggested, I used "GOTO " and "LBL " to jump over the real world input conversion logic so that the pseudo "C " bit inputs float and can easily be turned on/off by "Data View ".
Thanks again for the tip.
Created Date: March 23,2016
Created by: franji1
1. "Data View " cannot be used to "force " bits like "overrides " can.
Right click on the Data View and select Options .
In the Bit Display Settings group, check the Override Bits.
If you want the Override Bits to show up in all future Data Views, make sure you check the Apply Options To: New Views .
You will now have buttons to manipulate the Override state of the bits, in addition to the Value, in the Data View Edit column.
Data View content is saved as part of your project's workspace (in the .WSP file), so that the next time you open your project, the content of your Data View is also maintained.
Finally, if you want to re-use the same Data View in multiple projects, you can do Debug->Data View->Save As to save the contents as a file (w/extension .dta), then use Debug->Data View->Open to re-open any .dta data view file in that or any other project.
Created Date: March 22,2016
Created by: colepc
I have about 20 inputs for my program. While doing bench testing I use overrides for those 20 inputs. Every time I stop running the PLC, the overrides either stop working or they completely disappear. How can I save the overrides so that I don't have to keep typing them over and over again?
And why does it default to "Cancel " so that when I push the "Enter " key it throws away why I typed? And why do I have to keep pushing "Add " for each one, that is, why can't it assume I have several I want to add?