![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
|
Modicon 984 PLC Time settings
Hi guys,
I have recently moved jobs and I now find myself working with antique PLCs (Modicon 984s). It's a huge jump from Allen Bradleys super ControlLogix PLCs. Anyway, I have connected the Modicon up to a PC via the Modbus network and I am now communicating to the PLC using Wonderware Intouch version 7.0. I can do most things but I am struggling with one aspect and that is the time setting. Every time that I write to the registers that contain the time, the Intouch fails to overwrite the PLC time with the time that I have entered via intouch. Has anybody out there come across this before? Are the time registers read-only? Thanks, Colm |
|
|
|
#2 |
|
Member
![]() Join Date: Apr 2002
Location: WI
Posts: 1,152
|
984 PLCs were programmed in 984 Ladder Logic (984LL). Modicon programming software packages could be Modsoft, Proworx, or even Concept.
984LL registers are universal, there is no predefined allocation in the CPU. The 4x (I don't like trying to say 40001, so I use 4x1) registers are all processor read/program write and can be used for analog outputs as well as for holding registers. The 3x registers are processor read only and are used as analog or BCD inputs. The 984LL timer instruction preset can be a 4x or 3x register or a constant value. The accumlated count of the timer is always a 4x. What type of register is your Intouch trying to write to? Most Modbus drivers are only capable of writing to 4x registers. Are you using Modbus or Modbus Plus as your comm network? Modbus Plus uses only 4x registers. |
|
|
|
#3 |
|
Member
|
Hi there,
I am using Modbus Plus network and I am writing to 4x registers. You don't know just what a big smile I have on my face right now. You speak Modicon terms and I understand them....I am making progress! Every time I change either the hour or the minute value that is read into Intouch, the time reverts back to the old PLC time (not the time that I want it to be!) :-( |
|
|
|
#4 |
|
Member
|
What are you trying to do?
If you need to change timer preset, then put 4xxxxx register instead of constant #zzzz for preset and change this register. If you trying to write a value to accumulator register 4yyyy directly from HMI, that it may not work. Timer logic may have priority as far as I remember. Try to write number in 4yyyy from your programming software. Does this work? |
|
|
|
#5 |
|
Member
|
I just realized - you are actually trying to use PLC wall clock and not a timer instruction. Right?
I don't think you can do it at all. |
|
|
|
#6 |
|
Member
|
Here's how I do it on a 984-685E processor
In configuration I set my TIME OF DAY CLOCK as reg. 41590 So Then: 41591-day of week 41592-month 41593-day 41594-year 41595-hour 41596-minutes 41597-seconds I block move these to registers that I read on InTouch as "existing time" I then have other registers that I write to to change the Time register values. See attachment |
|
|
|
#7 |
|
Member
|
Try again
|
|
|
|
#8 |
|
Member
![]() Join Date: Apr 2002
Location: WI
Posts: 1,152
|
24hour clock
If you are trying to set the internal 24 hour clock, you must;
stop the clock - timer register 4x, Bit 1 on, Bits 2 and 3 off set the time - 4x+1 = day, 4x+2 = hour, etc. start the clock - timer register 4x, Bit 1 off, Bit 3 on When operating correctly the timer register bit pattern is 0110000000000000 |
|
|
|
#9 |
|
Member
|
Hi Jim,
I tried what you suggested and it doesn't appear to work for me. Here is what I did in one Intouch script that was activated via a button. Note:- My registers begin at 40128. Set reg 40128 = 32767 i.e. bit 1 = 1 (I also tried the value 32768) Set reg 40129 etc to the correct day etc. At the end of the script I set register 40128 to 8192 i.e. bit 3 = 1 or the done bit is set high. Then I set the clock running again by setting reg 40128 to 24576 i.e bits 2 and 3 are on. I would have thought this would work but it reverts back to the old time again. Would you have any more suggestions for me? Many thanks, Colm |
|
|
|
#10 |
|
Member
|
Hi Colm,
I'm gonna stick my nose in this one. 32767(10) = 0111 1111 1111 1111 (2) 24576(10) = 0110 0000 0000 0000 (2) Which is the bit pattern that Jim mentioned. Display the register data you want to monitor in the data display panel of Modsoft (or whatever) and change the display format to Binary (F3->F4 in ModSoft). Set the binary digits until you get the bit pattern that Jim recommended. Good Luck, (8{)} ( .) |
|
|
|
#11 |
|
Member
|
Hello again,
To stop the clock, Jim said bit 1 should be set high i.e. = 1 Therefore it should look like this:- 1000 0000 0000 0000 which is a decimal value of 32768 I see the error of my ways with the value of 32767. Thanks. Having said that, I have tried both 32768 and 32767 and both don't appear to work. Any suggestions on where I go next? Thanks, Colm |
|
|
|
#12 |
|
Member
|
Hi Colm,
I think that the obvious thing is to try to get the thing working manually. Once that works you should automate it with InTouch. I'd also recommend you constantly transmitting the PC's clock to the PLC. This way you'll have the data already there any time you want to set the clock. You'd just use a BLKM to move the data into the registers. The descriptions of the flags from the manual read as follows: 1 2 3 4 x x x x x x x x x x x x 1) Clock values are being set 2) Clock values are being read 3) all clock values have been set 4) error flag The manual is not a lot of help. It just says "set the bits appropriately as shown above..." so you'll have to monkey with it. I'd venture that only bit one should be set when you're setting the clock. Something else that may be tripping you up is the year. The manual I've got (OK, its from the last century) has the year value as a 2 digit number (ie. 1991 = 91). Sorry I can't be of more help. Good Luck, (8{)} ( .) |
|
|
|
#13 |
|
Member
|
Hi,
I have tried the whole process manually as well as using an Intouch script. Both ways come up with the same result..i.e. no change in the time of the clock! |
|
|
|
#14 |
|
Member
|
Colm, try this
Set REG. 40128 to bit pattern 1110 0000 0000 0000 (value 57344) Set your Clock values. Reset 40128 to bit pattern 0110 0000 0000 0000 (value 24576) Good Luck. Daryl |
|
|
|
#15 |
|
Member
![]() Join Date: Apr 2002
Location: WI
Posts: 1,152
|
Watch out for how Intouch handles Modicon bit assignements.
In a controller Modicon numbers bits from the left not the right. Modicon 1000000000000000 is decimal 1 not 32678. |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ARCOM RTU <--> Modicon PLC Interface | kaziz1977 | LIVE PLC Questions And Answers | 3 | March 9th, 2006 07:06 AM |
| Changing PLC clock time | Admiral Kmpec | LIVE PLC Questions And Answers | 2 | December 17th, 2004 09:06 AM |
| Modicon Micro 984 Lost Run | Derek Frerichs | LIVE PLC Questions And Answers | 6 | May 29th, 2003 11:43 AM |
| Modicon 984 Plc | LIVE PLC Questions And Answers | 6 | June 23rd, 2002 11:18 PM | |
| Modicon 984 Plc | shahid_iftikhar | LIVE PLC Questions And Answers | 1 | June 19th, 2002 02:11 AM |