Omron CJ2M - DATE function

Jothiswarup

Member
Join Date
Apr 2014
Location
Somewhere
Posts
33
Hello all,

I am trying to set PLC clock using DATE function.
When DATE function is enabled, I can see A351 to A354 change to the register value (D100 to D103).
But when the rung is false, A351 to A354 reverts to PLC clock time.

What am I doing wrong?

CJ2M - DATE funtion enabled.jpg CJ2M - DATE funtion disabled.jpg
 
All the Date settings are in BCD. You are writing them in Decimal. The instruction is probably failing due to "out of range", therefore reverting to the old time/date. You can check for that using P_ER immediately after the DATE function.

You'll need to monitor in HEX to view them in BCD. They'll be preceded with "#" instead of "&".
 
All the Date settings are in BCD. You are writing them in Decimal. The instruction is probably failing due to "out of range", therefore reverting to the old time/date. You can check for that using P_ER immediately after the DATE function.

You'll need to monitor in HEX to view them in BCD. They'll be preceded with "#" instead of "&".

Is this what you are referring to? If so, it is still the same.
Also to clarify, I am simulating this. Not sure if that makes a difference.

CJ2M - DATE funtion enabled - 1.jpg CJ2M - DATE funtion disabled - 2.jpg
 
Yes that's what I was referring to. Sorry, it actually shows "Hex" in the monitoring window. If you input values either by the watch window or in ladder, you'll need to precede the value with "#". But you already learned that. :)

I'm going to say the Date function cannot be simulated for a couple of reasons. It is a function that is stored and retained on the PLC. Simulation is working with an imaginary PLC so it's using your computer's time to view the clock. Notice when you double click the PLC Clock, they are identical. << I probably didn't explain that well but I think you get it. I know there are other limitations to simulation like PID and high speed outputs for similar reasons.

I also tested this on a real PLC here on my bench. What you show in your pics works fine in Hex (BCD). I then tested in the simulator and got the same results you did.
 

Similar Topics

Has anyone done SMS messaging from an Omron CJ2J-CPU31 PLC? If so could you help please. Omron here in Oz have not had any experience doing this...
Replies
5
Views
135
I have an old plc in the system I have, moxa nport was used to communicate with scada, I want to replace the plc with cj2m cpu33 and eliminate...
Replies
1
Views
63
Hi all, i have 8 CJ2m plc units that show different numbers on the plc display and i am stuck on reading the info. my unit has an ip address of...
Replies
3
Views
100
I have PLC Omron CJ2M with OD211 module. I want to use the pulse output and PWM output and this module. But i confuse how to activated this, i...
Replies
0
Views
109
I have a project to control the speed of motor DC using PWM Output on PLC and when im on working i have a several trouble and of of them is the...
Replies
6
Views
217
Back
Top Bottom