automation direct plc project I AM STUMPED!

Actually I see that I forgot to add in the math for creating V2000 as the combined hour/minute information. But just grab it from earlier in the thread.
 
Nice job Bernie!!! And thank you for the note...I am heading up to a Digester conference in NY later this month, still fighting with the USDA over $$$$$...

:site:
 
I just read Bernie's last couple replies and I am totally amazed, I dont even know what to say right now. I am going to load his brilliant work into my DL04 440cpu and study this masterpiece!!!!!!!!!! got to do a couple backflips first! wow!
 
Well its been a few days and I have been trying to figure out this program Bernie wrote. I also created a very simple program for my personal HMI to try and link it up with bernie's magic.

I'm learning a lil more everyday but still not enough to understand why v2000 only reads 0 and why _sp0 stays false while _sp1 stays true. I haven't got C0 to ever go true either. I tried making a few tweaks to see what would happen but I loaded bernies original monic back in since my tweaks were just an experiment. im going to load a vid to youtube and link it here showing the ladder and hmi in run.
 
I am concerned that V2000 remains zero. Check your real time clock registers (V7766 through V7771) for correct values. If not try using the Directsoft command to set the date/time.

The cycling of V2020 is correct. It is rapidly cycling through the 40 rooms, checking their entered On and Off times against the current time (which should have been in V2000).

If you have not set up the memory locations for the on and off times for each room for each day of the week (an admittedly long process) you will probably not see C0 turn on.

SP0 and SP1 are behaving exactly correctly. You won't see SP0 as ON since it is ON only for the very first scan. SP1 - note the name 'ON' - is ON.

Otherwise there is a lot of understanding of the memory layout (included as attachment) that I proposed in my posts and the nature of pointers. Just follow the first of my 3 posts. Don't worry about the total program I posted until the very end.

LightTimeStorage.jpg
 
Last edited:
I am concerned that V2000 remains zero.
At the bottom of Rung 3, it seems like if the clock register V7770 is not set properly, then V2000 will always be zero:

LD V7770
MUL K100
ADD V7767
OUT V2000
 
I might be wrong, but, looking at the video, it looks like you may be trying to use the original file in post #15, not the updated file in post #17.
 
I think you may be right about the version of the program.

But I had hoped he, or anyone for that matter, would start with the first post (with the added hour/minute logic for V2000) and understand it first before progressing.
 
OK, v2000 does work correctly . wow staring at a computer screen for hours can make ya batty! lol. Now I have discovered that my c-more HMI and 440 PLC are not communicating with each other. I am not sure what I did. I will make another vid and see who spots my goof this time! lol. I sure have better luck with Allen Bradley.
 
I'm glad you got the V2000 working, things go bump in the night sometimes. Take a quick look at this thread.
http://www.plctalk.net/qanda/showthread.php?t=69983
It is for EZ to AB but maybe it will help. Check all the comms settings and cable connections. Make a simple EZ tag and a test rung in the PLC. You can use an ON-OFF button to watch to see if the bit is going into the PLC
 
My code for room one, almost there!

Code:
PLC 440

// Rung 1
// Address 0
#BEGIN COMMENT 
""
" 24-hr clock value for use in Time-of-day operations."
""
"Rung 1 updates the clock value once per second"
#END
STR "_1Second"
PD C0

// Rung 2
// Address 2
#BEGIN COMMENT 
"Rung 2 loads the 'Hours' value, shifts it left by 2 digits, and adds the 'Minutes' value, "
"resulting in a Time-of-Day value in HHMM format."
#END
STR C0
LD V7770
SHFL K8
ADD V7767
OUT V2000

// Rung 3
// Address 8
#BEGIN COMMENT 
"RUNG 3 -9 PROVIDES UP TO 7 TIME BANKS PER ROOM THAT CAN BE SELECTED "
"BY HMI PUSHBUTTONS"
""
"Typical ""Constant Time Each Day"" rung."
#END
STR V2000 K700
ANDN V2000 K1300
OUT "TIME BANK 1"

// Rung 4
// Address 13
#BEGIN COMMENT 
"Typical ""Constant Time Each Day"" rung."
#END
STR V2000 K700
ANDN V2000 K1400
OUT "TIME BANK 2"

// Rung 5
// Address 18
#BEGIN COMMENT 
"Typical ""Constant Time Each Day"" rung."
#END
STR V2000 K700
ANDN V2000 K1500
OUT "TIME BANK 3"

// Rung 6
// Address 23
#BEGIN COMMENT 
"Typical ""Constant Time Each Day"" rung."
#END
STR V2000 K700
ANDN V2000 K1600
OUT "TIME BANK 4"

// Rung 7
// Address 28
#BEGIN COMMENT 
"Typical ""Constant Time Each Day"" rung."
#END
STR V2000 K700
ANDN V2000 K1700
OUT "TIME BANK 5"

// Rung 8
// Address 33
#BEGIN COMMENT 
"Typical ""Constant Time Each Day"" rung."
#END
STR V2000 K700
ANDN V2000 K1800
OUT "TIME BANK 6"

// Rung 9
// Address 38
#BEGIN COMMENT 
"Typical ""Constant Time Each Day"" rung."
#END
STR V2000 K700
ANDN V2000 K1900
OUT "TIME BANK 7"

// Rung 10
// Address 43
#BEGIN COMMENT 
"ROOM 1 HMI CONTROLS. "
"MAN LIGHTS ON, MAN KILL LIGHTS, AUTO,  WEEKDAYS ARE DEFAULT, "
"WEEKENDS ARE TOGGLED BY HMI SELECTION, PUSHBUTTONS TO SELECT "
"TIME BANK,"
#END
STRN "ROOM 1 AUTO"
ANDN "ROOM 1 MAN KILL"
STR "ROOM 1 AUTO"
AND "TIME BANK 1"
ORSTR
STR "ROOM 1 AUTO"
AND "TIME BANK 2"
ORSTR
STR "ROOM 1 AUTO"
AND "TIME BANK 3"
ORSTR
STR "ROOM 1 AUTO"
AND "TIME BANK 4"
ORSTR
STR "ROOM 1 AUTO"
AND "TIME BANK 5"
ORSTR
STR "ROOM 1 AUTO"
AND "TIME BANK 6"
ORSTR
STR "ROOM 1 AUTO"
AND "TIME BANK 7"
ORSTR
STRN "KILL SATURDAY"
ANDN "KILL SUNDAY"
OR "ENABLE SATURDAY"
OR "ENABLE SUNDAY"
ANDSTR
OUT "ROOM 1 OUTPUT"

// Rung 11
// Address 72
END

// Rung 12
// Address 73
NOP

// Rung 13
// Address 74
NOP

// Rung 14
// Address 75
NOP


#BEGIN ELEMENT_DOC
"Y0","ROOM 1 OUTPUT","",""
"Y1","","","ROOM 1"
"C1","TIME BANK 1","",""
"C2","TIME BANK 2","",""
"C3","TIME BANK 3","",""
"C4","TIME BANK 4","",""
"C5","TIME BANK 5","",""
"C6","TIME BANK 6","",""
"C7","TIME BANK 7","",""
"C10","ROOM 1 AUTO","",""
"C11","ROOM 1 MAN KILL","",""
"C100","KILL SATURDAY","",""
"C101","KILL SUNDAY","",""
"C102","ENABLE SATURDAY","","HMI TOGGLE ENABLE SAT"
"C103","ENABLE SUNDAY","","HMI TOGGLE ENABLE SUNDAY"
"V2000","","","TIME OF DAY"
"V3000","","","DAY FROM HMI"
"V3010","","","TIME ON FROM HMI"
"V3020","","","TIME OFF FROM HMI"
"V7771","","","ACTUAL DAY OF WEEK"

#END
 

Similar Topics

Hello, I have an automation direct d2 262 plc and C-more HMI EA9T6CL-R. I need to prepare a program, scheduled to be performed on a future date. I...
Replies
1
Views
119
Does AD have a line of PLC's that can perform like Guardlogix?
Replies
2
Views
1,471
Hi, I am currently challenging in a new requirement on my new project. We have delivered a project long year ago using DL-250-1 PLC+ 8 point...
Replies
1
Views
1,524
Does anyone know if it is possible to control an Automation Direct PLC (P3-550E) using an Allen Bradley Panelview HMI (2711P series)? I'm not...
Replies
5
Views
1,735
Looking at using a Click Basic PLC with Ethernet on some counting applications to count objects entering a certain area and count objects exiting...
Replies
10
Views
2,433
Back
Top Bottom