aw
Jr. Member
 
Posts: 11
|
 |
« on: August 20, 2010, 03:31:25 pm » |
|
Does anyone know why this function is not working? My V7771 always displays "0" which is Sunday. I am using Diretsoft5
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #1 on: August 20, 2010, 03:53:53 pm » |
|
Which PLC?
|
|
|
|
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
aw
Jr. Member
 
Posts: 11
|
 |
« Reply #2 on: August 20, 2010, 04:09:04 pm » |
|
DL260
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #3 on: August 20, 2010, 05:19:56 pm » |
|
Are any of the other Time/Day fields changing? Do you have any logic in the PLC program which modifies the Time/Date fields?
|
|
|
|
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
franji1
|
 |
« Reply #4 on: August 23, 2010, 08:41:42 am » |
|
yes, the Time/Date works correctly. I can change it through the program (input from HMI)
Are you also setting the DayOfWeek via the HMI? The DATE instruction always sets the Year, Month, Day and Day of Week values.
|
|
|
|
|
Logged
|
|
|
|
aw
Jr. Member
 
Posts: 11
|
 |
« Reply #5 on: August 23, 2010, 08:47:45 am » |
|
No, I dont change it through the HMI. I tried to change the value through plc ( changing value) but it's not taking it. Actually the value changed over weekend, but it shows 3 (wednesday) today.
|
|
|
|
|
Logged
|
|
|
|
|
franji1
|
 |
« Reply #6 on: August 23, 2010, 08:51:49 am » |
|
If you are using the DATE instruction in the PLC to set it via the HMI, you must also set the Day of Week value correctly (LOW BYTE in the LOW WORD, BCD). You cannot set the V7774/V7773/V7772/V7771 values directly, those are READONLY and set by the PLC firmware from the time-of-day chip in the PLC hardware. To set the time-of-day chip, you must use the DATE (and TIME) instructions.
|
|
|
|
« Last Edit: August 23, 2010, 08:53:42 am by franji1 »
|
Logged
|
|
|
|
aw
Jr. Member
 
Posts: 11
|
 |
« Reply #7 on: August 23, 2010, 08:58:34 am » |
|
all the Time?Date memory location are shown correctly. How do I write to V7771 ? Is there any sample program? I am already using the one for synchronizing Date/Time with HMI.
|
|
|
|
|
Logged
|
|
|
|
|
franji1
|
 |
« Reply #8 on: August 23, 2010, 08:58:52 am » |
|
Sorry - you are NOT using the HMI (my bad). Just use DirectSOFT to set it. Go online then do PLC->Setup->Calendar... and hit Get PC Time button then Write PLC, or just edit the fields by hand and then do the Write PLC.
|
|
|
|
|
Logged
|
|
|
|
|
franji1
|
 |
« Reply #9 on: August 23, 2010, 09:01:19 am » |
|
That sample program is probably using the DATE and TIME instructions. See what memory locations the DATE (and TIME) instructions are using.
|
|
|
|
|
Logged
|
|
|
|
aw
Jr. Member
 
Posts: 11
|
 |
« Reply #10 on: August 23, 2010, 09:10:53 am » |
|
YES !! It did change to Monday. I never did it through Calendar, thinking that it's already done through HMI. Calendar was showing correct date and time, so it didn't occur to me to write it to plc anyhow. Thank you !!!
|
|
|
|
|
Logged
|
|
|
|
|
franji1
|
 |
« Reply #11 on: August 23, 2010, 09:16:45 am » |
|
One question remains - are you using the HMI to synchronize your PLC date/time?
|
|
|
|
|
Logged
|
|
|
|
aw
Jr. Member
 
Posts: 11
|
 |
« Reply #12 on: August 23, 2010, 10:04:40 am » |
|
Yes, I am. Using the sample program and hmi clock set to read external.
|
|
|
|
|
Logged
|
|
|
|
|
franji1
|
 |
« Reply #13 on: August 23, 2010, 10:11:29 am » |
|
Then there's something wrong - the HMI is not setting the day-of-week byte for the DATE instruction. Find the DATE instruction in your program (Ctrl+F then enter DATE in the Find dialog), and export the entire rung logic that is using the DATE instruction, along with the V register value as a DWORD BCD in your 260 (e.g. DATE V2000, you would look at V2000 as a DWORD sized BCD/HEX in the Data View).
|
|
|
|
|
Logged
|
|
|
|
aw
Jr. Member
 
Posts: 11
|
 |
« Reply #14 on: August 23, 2010, 10:31:52 am » |
|
Here is a .gif attachement. Is there any other way to export just a few rungs to .txt file?
|
|
|
|
|
Logged
|
|
|
|
|