06-03-2009 03:29 PM
06-08-2009 07:33 PM
Wrote a rung using the existing "and", "not", "output". It would be nice to have and "or" on the contact and coil menu. I couldn't rename or assign a variable to any of the contacts/outputs I used. How could I create variables and link them to the conctact? It seems this is the beginning of a great accomplishment for LabVIEW. Does any tutorial on LDE exists or a place where I could document myself more? Thanks and keep up the great job.
06-09-2009 12:15 PM
Shining Eagle wrote:Wrote a rung using the existing "and", "not", "output". It would be nice to have and "or" on the contact and coil menu. I couldn't rename or assign a variable to any of the contacts/outputs I used. How could I create variables and link them to the conctact? It seems this is the beginning of a great accomplishment for LabVIEW. Does any tutorial on LDE exists or a place where I could document myself more? Thanks and keep up the great job.
All of the Boolean functions (And, Or, Not, etc.) are on the Boolean palette. The Contacts and Coils palette only contains contacts and coils (and the Stop Ladder function).
I don't understand the problem you're having with renaming or assigning variables. Could you reply with some specific steps to reproduce it, or perhaps attach a very simple project demonstrating the problem?
The online help for the Ladder Editor is currently the only documentation available. It is found at Help > LabVIEW Ladder Diagram Editor Pioneer Help.
06-10-2009 12:54 PM
Thank you Darren,
I see where you are coming from. In general PLC editing program menu's we have at the very least AND, OR, & OUT contacts. Having OR contacts in the menu, makes it easier when writing "drawing" a program. To explain it I am attaching ladder file [First Ladder 1.lvlad], which shows a sequence of the steps that had to take place in order to draw the OR contact configuration on Rung 3. Should I have the Or contact in the menu I just have simply placed it directly in Rung # 3. Now if you see in Rung 3 right after the bold vertical line the OR contact shows another vertical line which is unnecessary. PLC programs I used will not show that extra vertical line in the position just right of bold vertical line. NI Ladder Diagram Editor (LDE) current version doesn't have the capability to remove that "light" vertical line yet.
About renaming/assigning variables. As you see all I/O, in enclosed [First Ladder 1.lvlad] file are named: <<var???>> Will you enlighten me about how to relate each contact to a variable?
Thank you very much for making LV a greater application software.
06-10-2009 01:21 PM
06-10-2009 02:41 PM
I see what you're saying about the vertical line...you would prefer that the rung for the second contact be sourced by the left rail instead of a branch of the rung. We noticed that some software uses that syntax, while other software does not. For the purposes of the actual logic, though, the two are identical.
In order to assign variables to your contacts and coils, you must first create variables in the LabVIEW Project window. Once you have done that, you should be able to click on the <var???> text in the LabVIEW ladder editor to reassign the variable to one of the ones you created in the project window. Alternatively, I believe you can right-click on the contact/coil and choose "Edit Variable".
06-10-2009 03:49 PM
Thanks Darren,
I am having difficulty creating a variable and relating it into LDE. Will you be able to elaborate a bit more on the process? Maybe an example that shows or utilizes some variables related to LDE?
Thanks in advance for your help in this issue. Juan
06-10-2009 04:47 PM
06-11-2009 01:50 PM
Great guidance! Thanks a lot Darren!
I was able to name variables, create and run attached file named [Second Ladder Diagram with Variable Names]. Will you be able to show how to interface hardwired switches and outputs, connected to my DAQ card to Ladder Diagram contacts?
Thank you so much!
06-11-2009 02:18 PM
The Ladder Diagram Editor will only directly interface to hardware that is exposed with variables. For example, when communicating with cRIO modules via LabVIEW Real-Time, the channels on those modules are exposed in the LabVIEW project as variables under the RT cRIO target. With DAQ channels, I don't believe there is a similar mechanism. So in order to communicate with your DAQ hardware, I think you'd need to write a VI that will continuously read DAQ channels and write their values to variables (and vice-versa with writing DAQ channels)...perhaps the DAQ Assistant Express VI would make this easy? Once you had that set up, you would run that VI in parallel with the ladder diagram that is also read/writing those same variables.
If you end up getting a setup like that working, it would probably be beneficial for you to post the project to this thread as an example for anyone else wanting to do DAQ with the ladder editor. Good luck!