View Full Version : DL205 directsoft5 C-More EA7-S6C
wildcatherder
May 22nd, 2009, 05:06 PM
Although I have programmed in a variety of higher level languages and have gone through several PLC ladder-logic tutorials, I have found nothing about interaction between the DL205 (using a D2-250-1 CPU) and the C-More EA7-S6C touch panel. The Touch Panel manual is hardware and self-programming oriented. The DirectSoft manual seems to leave external interface panels as "an exercise for the reader".
I understand that each object on the screen has a memory address and for simple on/off inputs and outputs that is clear enough. What I need is an example of the ladder-logic - just a screen capture would be great (because few people are still using DirectSoft5) showing how to read and write Numeric Inputs and Outputs from/to the Touch Panel.
I have searched the AutomationDirect and HostEngineering forums with no joy.
Any assistance would be appreciated.
bernie_carlton
May 22nd, 2009, 07:08 PM
Wildcatherder - your posts here, on the AutomationDirect forum and on the Host Engineering forum seem to show a fundamental misunderstanding about the role of the display panel in relation to the PLC. After this please confine your posts to one forum, choose which and post that fact to the other forums.
In the normal Display-PLC setup the PLC is the place which holds all the information regarding values.
Let's discuss display and input objects on the display (the C-More in this case).
On the C-More a display object is programmed to look at an address WITHIN THE PLC. The display, at run time, asks the PLC for that value which is at that address and displays it. The PLC does not actively SEND the value to the display except in response to a request from the display.
An input object (let's say a number) is programmed such that, once a number is entered by the operator, to send that number to a specific location within the PLC. (As a help the input object may have asked for and displayed the current value - similar to an display object - from the PLC). The PLC does not actively request from the display the value. The value is sent by the display into the PLC.
As I said before - you must understand the relationship of which hardware item (the display) initiates any communication and which item (the PLC) responds to those requests.
bernie_carlton
May 23rd, 2009, 09:32 AM
Let me expand on my previous reply.
Typically there does not have to be any extra ladder logic in the PLC for the display to perform its communication. The responding by the PLC to queries happens automatically by the PLC system.
When you are creating tags in the display program and enter an address, that address is the location of the information within the PLC. I can't tell if possibly you thought that the display had a set of memory locations with coincidentally similar nomenclature.
wildcatherder
May 28th, 2009, 10:54 AM
In fact, there are memory locations in the touch screen but they are MAPPED to locations in the PLC, in a transparent fashion. My fundamental misunderstanding is that I asked for a simple example and not an explanation of my ignorance and thought this was a place I could get it.
bernie_carlton
May 28th, 2009, 11:32 AM
I'm sorry that I must have misunderstood your intent in your sentence...
What I need is an example of the ladder-logic - just a screen capture would be great (because few people are still using DirectSoft5) showing how to read and write Numeric Inputs and Outputs from/to the Touch Panel.
... since no ladder-logic is used in the transfer of information to/from the display. Maybe you can set me straight on what you need.
Brian123
May 28th, 2009, 11:36 AM
In fact, there are memory locations in the touch screen but they are MAPPED to locations in the PLC, in a transparent fashion. My fundamental misunderstanding is that I asked for a simple example and not an explanation of my ignorance and thought this was a place I could get it.
From your original post, it appears that you want a screenshot of the ladder logic used to move numbers, bits, etc. to the touch screen. You will NEVER FIND this example because you do not use ladder logic or directsoft to program a touchscreen. Bernie is right when he says that you don't need any ladder logic present in the PLC for the touchscreen to communicate. You DO however need a completely separate software package to program the touchscreen. The manual for that software will explain how to connect objects on the screen to memory registers in the PLC. This is what creates the mapping you referred to in your latest post. The mapping doesn't exist without you creating it. It is not as if you can copy V2000 to V40000 and have it show up on your panel.
Now, it is possible you understood all this to begin with. If so, you didn't make that understanding very clear when you are asking for ladder logic screenshots and mentioning DirectSoft, a PLC programming package only. Also, you only ever mentioned reading the manual for the touchscreen (which only gives information on the hardware portion of the screen, not the programming) and the help in directsoft (which is the programming software for the PLC.) So forgive Bernie if he thinks you have some gaps in your understanding of how this stuff works; I thought the same thing.
Brian
icky812
May 28th, 2009, 11:55 AM
The help file in the CMore software is very detailed. Also there are several sample projects in the Cmore projects directory.
As others have mentioned, the Cmore initiates all "conversations" with the PLC and will read/write directly from the PLC memory. You will make tags to address the User Defined memory areas that you want data transferred from/to in the Cmore software. There is no ladder logic involved.
wildcatherder
May 28th, 2009, 01:09 PM
I have a numeric input, a numeric display, and a pushbutton.
What would the ladder logic look like to add the number 2 to the value entered on the numeric input and have it appear on the numeric display?
I know this is very, very simple, if you have already done it once.
Please show me how it is done, once.
Thank you.
wildcatherder
May 28th, 2009, 01:10 PM
Sorry, too simple. Addition should occur when button is pushed.
bernie_carlton
May 28th, 2009, 01:22 PM
Check out the Increment/Decrement Value control. No ladder logic needed.
jgreenewv
May 28th, 2009, 01:37 PM
Here's a bit of code that will do what you're looking for. Just substitute the appropriate addresses, depending on your particular system.
Brian123
May 28th, 2009, 01:38 PM
I have a numeric input, a numeric display, and a pushbutton.
What would the ladder logic look like to add the number 2 to the value entered on the numeric input and have it appear on the numeric display?
I know this is very, very simple, if you have already done it once.
Please show me how it is done, once.
Thank you.
Sorry, too simple. Addition should occur when button is pushed.
Ok, I will make the following assumtions about your system. If any of these are incorrect, you will have to adjust the rung accordingly.
Your pushbutton is set to turn on (and leave on) bit C0 in the PLC. This would not be a momentary pushbutton.
Your numeric input is set for 16 bit BCD Integer, no decimal places and pointed at V1400.
Your numeric display is set for 16 bit BCD Integer, no decimal places and pointed at V1401.
The number 2 that you want added is a constant, never changing number.
If you have any questions on this, let us know.
Brian
wildcatherder
May 28th, 2009, 01:41 PM
Thank you all for answering my simple question. Seeing one (or, in this case a few) examples is really all I needed to get started. As an expert, one takes for granted that elements of layout, vocabulary, etc. are just not that obvious.
I know because, believe it or not, I am expert in certain areas and have made similar assumptions.
Thanks again.
Brian123
May 28th, 2009, 01:49 PM
Here's a bit of code that will do what you're looking for. Just substitute the appropriate addresses, depending on your particular system.
I will assume that in your example, you have your HMI pushbutton to be set for momentary. In this case, the bit associated with the pushbutton will be changed to ON for as long as the pushbutton is held down on screen. When the pushbutton on screen is released, the bit is changed to OFF. With the ladder setup as shown in your example, the addition operation will happen _every scan_ that the pushbutton is held down for. In this instance, it will not matter. The end result will be the same for each scan, whether it is one scan or hundreds (very possible.) However, if you setup a button to increase a register with a similar ladder setup (not the Inc/Dec funtion Bernie mentioned) multiple executions would be bad. An example would be: LD V1400, Add K2, OUT V1400. In this example, V1400 would increase for every operation. In cases like this, use the ladder setup that I gave and the operation should only occur once.
Brian
wildcatherder
May 28th, 2009, 02:08 PM
Why one needs simple examples - #1
The OUT command gives the error "Invalid Element" when I try to load the original address of my Numeric Display: V10016.
I changed the C-More project to use V1400 and V1401 for my numerics, as in the example from Brian123 but got the same "Invalid Element" error when trying to enter the OUT instruction. (I'm also unsure that one can actually address two 16-bit displays one bit apart doesn't work when the second is V1416 either.)
Any suggestions? This is on DirectSoft5 with the C-More EA7 panel.
wildcatherder
May 28th, 2009, 02:21 PM
I have checked that both the memory ranges tried are in the memory map for my PLC and are marked as Variable(WORD). I did notice in the "Element Browser" that all the Valid Ranges for OUT are BIT types. I searched the help for variation of OUTx but did not find a word type OUT command. I know there must be one. Any idea?
wildcatherder
May 28th, 2009, 02:27 PM
OK, this one was obscure for a newbie but the OUT-to-register command is considered a "box" in DirectSoft. You have to hit F7 and choose OUT from the Accumulator/Stack Box Class. (Of course?)
wildcatherder
May 28th, 2009, 02:28 PM
Typing OUT for a new entry gives you a coil output.
Brian123
May 28th, 2009, 02:31 PM
OK, this one was obscure for a newbie but the OUT-to-register command is considered a "box" in DirectSoft. You have to hit F7 and choose OUT from the Accumulator/Stack Box Class. (Of course?)
Sorry, I wasn't able to get back here sooner.
Yes, the default OUT is an OUT-to-coil, which only accepts C addresses. If you press / after typeing OUT, the instruction will change from OUT-to-coil to OUT-to-register. This is a shortcut to the longer route that you found. It is a common question.
Brian
bernie_carlton
May 28th, 2009, 02:33 PM
That's one of the problems with having two instructions named the same (thank you Koyo)
The OUT function, when typed at the end of a ladder, initially defaults to the turning on of a single bit. With the OUT still showing press the '/' key (beneath the question mark). This changes the function to the OUT - WORD operation which then will accept the V register. Another way, instead of typing OUT is to select the BOX icon from the instruction pallet then type OUT in the left hand box (entitled 'Box') and press Enter.
Brian123
May 28th, 2009, 02:35 PM
Also, the / key will change a normally open contact to a normally closed (instead of hitting F3). It will change other similar instructions. It cycles through < > = and not = when you have the cursor on one of these instructions. Once you figure this out, it is a very handy key.
Brian123
May 28th, 2009, 02:43 PM
It occurs to me now that you may not have read through the manual for your PLC processor. I know that the DirectSoft help will explain the different commands, but I find that the manual is easier to reference. I usually open it at some point to look up information on an instruction while I am programming.
The manuals are available in pdf format from AD in their support section of the website.
Brian
wildcatherder
May 28th, 2009, 04:08 PM
The attached file based on what Brian123 clearly identified as a "rung", shows a complete working example, for newbies everywhere.
Anyone can forget an END statement but nobody gets the PLC to run without it.
The resultant project is "saved to PLC". The PLC CPU is switched from Term to Run and is ready to go.
The user enters a number in the numeric output, presses the Pushbutton and the result appears in the numeric display.
I appreciate the comments about the type of switching used and how it affects every scan vs. one scan only.
I have read the manual for the D2-250-1. I'm the kind of engineer who reads all the manuals. I didn't memorize the manual. There was no specific command "dictionary"; it all appears to be in the help, which assumes you know what you are looking for. I do remember the reference to inverting the sense of a contact with a backslash, do not remember that being applied to "OUT", but good to know.
I know a lot about programming in general. Now, thanks to all who helped, I have learned certain specifics for DirectSoft which will serve me well. In the process, we have left a working example for newbies to come.
Brian123
May 28th, 2009, 04:34 PM
The attached file based on what Brian123 clearly identified as a "rung", shows a complete working example, for newbies everywhere.
Anyone can forget an END statement but nobody gets the PLC to run without it.
The resultant project is "saved to PLC". The PLC CPU is switched from Term to Run and is ready to go.
The user enters a number in the numeric output, presses the Pushbutton and the result appears in the numeric display.
I appreciate the comments about the type of switching used and how it affects every scan vs. one scan only.
I have read the manual for the D2-250-1. I'm the kind of engineer who reads all the manuals. I didn't memorize the manual. There was no specific command "dictionary"; it all appears to be in the help, which assumes you know what you are looking for. I do remember the reference to inverting the sense of a contact with a backslash, do not remember that being applied to "OUT", but good to know.
I know a lot about programming in general. Now, thanks to all who helped, I have learned certain specifics for DirectSoft which will serve me well. In the process, we have left a working example for newbies to come.
Yep, sorry, I forgot the END. At least the error message for that one is pretty self-explainitory. I had assumed (don't know why, thinking back on it now) that you had a working program in a PLC that you were trying to interface with.
The scanning, looping nature of the PLC is something that some people have trouble with. It brings some non-obvious behaviour to the table for those that aren't familiar with this programming style. This example is one of them.
FYI, chapter 5 of the manual does have all the instructions categorized by function type. It might help if you know what kind of operation you are trying to perform, but don't know the instruction name.
Hopefully we didn't get off on the wrong foot. Keep in mind that some people who come here asking for help are modifying an operating machine that has the capability to hurt or kill someone. It is not common for the members here to just give an answer without making sure that the questioner is fully aware of what is happening in the PLC (or whatever system he has). If there appears to be a gap in your knowledge, or anyone's for that matter; that is usually the first thing to attend to.
Anyway, welcome to the forum. If you have questions about other aspects of PLC programming, ask away. I am sure you will find several members here willing to help you.
Brian
.