Jump to content

Recommended Posts

Posted
Download the Q Common Instructions manual SH(NA)080039 from here or www.meau.com and look up the DATERD instruction. That will read the PLC clock into 7 registers, and you can compare to any one of them.
Posted
Right, I was looking at the manual when I posted this, My skill level is as BASIC he he as you can get, the most I have ever done was with cscape and that was for a float switch project. I understand that the date I want is stored in d10 –d16, and in my case d13 is the hour and d14 is the minute, and before I compare anything it sounds like I need to read it. Plus I need to specify the data I want to compare it to.. This is where I get lost, where do I specify my data to compare it to? And how do I read both d13 and d14 Would it look something like this MY hour My minutes |-------------d100 = 17----------d110=30---| Set my data? |-(daterd d13 d14)----------------------------| |------( ld d13 d100)----------------(y22)----| |------( ld d14 d110)—| | |----------------------------------------(end)---| Any help and or example would be great . Thanks
Posted
Prefix defines how number will be interpreted by PLC. K - decimal (K10= 10), H - hexadecimal (H10 = 0x010h = 16) E - floating point etc. Since you seam to be at very early stage of becomming familiar with Mitsubishi, I would strongly suggest reading manual for GX Developer such as IB(NA)0800190 but there should be newer ones too (this one is for GX Dev version 7). This explains a lot and in my opinion it should definitely be your first document (second will be instruction manual for CPU, followed by manuals for any card you plan on using). Manuals are available from www.meau.com but some are also here in Download section -> Mitsubishi manuals: http://forums.mrplc.com/index.php?dlcategory=20 If you are familiar with Allen Bradley PLCs and just need crush course, see Mitsubishi article by Jim Rowel - see Mitsubishi tutorials: http://www.mrplc.com/kb/index.php?page=index_v1&c=4 and introduction to Mitsubishi for those who are familiar with AB: http://forums.mrplc.com/index.php?showtopic=1104 There are also some program samples in MrPLC download section, check them out.
Posted
The DATERD instruction only has one parameter, and that is the first of the 7 addresses where you want the clock data stored. The PLC actually uses the clock from in the SD area of memory. DATERD simply allows you to drop the 7 pieces of information into 7 registers. Check the example programs I put in the Downloads section about Daylight Savings Time as they show both DATERD and DATEWR to update the clock. They also show numerous comparison instructions.
Posted
Foreman bob - before you learn how to read the time and use this time to do an action - you have to understand what you need to do. You are struggling to understand how to read data and what to do with it. So take it one step at a time. The time is stored in several data registers. These will be incremented as time moves on, ie each second the data register for seconds will increment by 1. each minute the minute data register will increment by 1 etc etc. If you want an action to happen at a specific time then you have to compare what is in the time register you want, with what you have put in another data register. You have to put the time you want in that data register. So you would move a value into a register that would represent the time you want the action to happen. say you want the action to happen at 4:00 am. Then you would move the value 4 into a register of your choice then compare that with the hour data register. ie MOVP k4 D100 (put the value 4 into D100) Then you want to know when the hour data register equals 4 That would be -[= d13 d100]- this is a condition that checks the value of both registers and when they are equal the condition becomes true. If you want your output on for the whole hour of 4:00 am you can put the output after this condition ie ---[ = D13 D100]---(Y21). Y21 will only be on while D13 is equal to 4 (one hour) Hope that helps a little in explaining what you have to do
Posted
That is perfect, I want this output to stay on till I hit another time, so I figured I would use the set command and then reset it at another time. Thanks a lot BTW I printer out 3 thousand pages Of Mitsubishi manuals today…fun times Thanks guys…

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...