News:

  • October 03, 2025, 05:44:54 PM

Login with username, password and session length

Author Topic: Newbie Assistance  (Read 4219 times)

hrsnblm

  • Newbie
  • *
  • Posts: 5
Newbie Assistance
« on: September 18, 2008, 11:34:06 AM »
I am new to PLC programming and especially new to this software (DirectSOFT5) and am having troubles finding information to do what I would like. I am modifying an existing program, that is without any annotations. I am trying to add some (like ID'ing contacts) but find that the software is not doing what I would like or what I thought it would. For example, I want to ID a N.O. contact (X0) as "Main Tank Full" and the closed symbol as "Main Tank Not Full", but the software does not allow that. It tries to apply the same description to all representations of X0. Am I missing something? Is there a way to do what I want?

I appreciate any assistance ahead of time and I will definitely be back....

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: Newbie Assistance
« Reply #1 on: September 18, 2008, 12:52:29 PM »
I don't believe there is a way in DirectSoft to do this.  Some programming packages have this and to be honest, I haven't really found it useful.  You said you're new to PLC's and I suspect as troubleshooting ladder logic becomes more intuitive to you, "Main Tank Full" over a NC contact will automatically start resolving to "Main Tank Not Full" without your even having to think about it.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: Newbie Assistance
« Reply #2 on: September 18, 2008, 12:54:48 PM »
The software does not have instruction level documentation.  These are symbolic names for the PLC memory elements, a 1-to-1 mapping of the element to a symbolic name, called Nicknames.  This way, you can reference X0 using a nickname (e.g. Pump1Running) whether it's in a contact instruction, a parameter in a box instruction, an entry in a data view table, cross-reference table, find, etc.

So if you brought up the FIND dialog (Ctrl+F), you could type Pump1Running and it would find the next occurrence of X0 in your program, regardless of how it was used.

hrsnblm

  • Newbie
  • *
  • Posts: 5
Re: Newbie Assistance
« Reply #3 on: September 22, 2008, 02:49:18 PM »
Thanks to Controls Guy & franji1 for your answers. While off-line, I had a local controls person explain to me how and why this works. I am having a little trouble getting arms around some of these concepts. I have a software background and some of these ideas are a little alien to me. But, where there a will, there's a way. Especially since the boss says I WILL learn it.

Thanks again.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: Newbie Assistance
« Reply #4 on: September 22, 2008, 03:29:42 PM »
A nickname is a lot like a variable in C/C++ or Basic.  In C, you would write code like

bool MainTankFull = (WaterLevel >= 1000);

if (!MainTankFull)
   {
   OpenWaterValve();
   }


The symbol is MainTankFull, but when you see the BANG ! in front (in C), you know that means NOT.

Ladder Logic has a grammar for "not" contacts: -] / [-

So if you see

MainTankFull
----]   [----

versus

MainTankFull
----] / [----

you'll eventually differentiate it just like you would

if (MainTankFull)

versus

if (!MainTankFull)