Omron Last Print Duration

bopol

Member
Join Date
Feb 2008
Location
Singapore
Posts
46
Hi guys,

Just want to know if there is an easier way to do the below function using Omron CX Programmer (Cj2-CPU13).

Function:
1. Press Print
2. Date and time "saved" to currDate memory (retained)
3. CPU serial port sends text string to text printer thru txd_cpu command. Included in the printed text is the Current Date and Time and the Last Print Date and time (inititally, current date and last print date is the same)
4. After Printing is finished, currDate is "moved" to memDate
5. Press Print Again, the currDate memory is updated.
6. Printer Prints the Current Date and Time and the Last Print Date stored in memDate.
7. After Printing, the memDate is updated.

*Current Date/Time and Last Print Date/Time is input as string in a FB before printing

***This Part is Done***

Additional Requirement:

1. Add the "Duration" from the last print date to the current date in the printed text.

Ex:
Current Date: 4-10-2012 12:30:30
Last Print Date: 3-10-2012 14:20:30
Duration: 0Y 0M 0D 22h 10m 0s

How I am planning to fulfill the addt'l req:

1. extract the following strings: Day, Month, Year, Hour, Minutes, Seconds (both current and memory values)using the MID$ function then convert as integer.
2. Get the duration by using the attached FB "Duration FB". (I haven't actually written this in CX programmer yet, will be able to do it later at the office).
3. Convert the results back to string then include in the printed text.

o_Oo_Oo_O

If any of you guys have done something similar or know of a function that could do what is required, please point me in the right direction.

P.S. this is only my second time using Omron so i am not very familiar with the functions yet.



TIA and regards,

Paul S.
 

Similar Topics

Hi There, I have couple of Omron PLCs connected on my kepserverex and my intouch reads data from kepserverex. I have been observing that roughly...
Replies
1
Views
47
Hi dear . I have a system with cj1m cpu11 etn. previously NT 5z HMI was connected with plc. recently my old HMI got damaged. I want to replace it...
Replies
5
Views
80
Omron AD081-V1 Analog Input Card Offset & Gain Adjustment Entering Adjustment Mode 1. Set the input card in adjustment mode (Turn ON Dip SW No-1)...
Replies
0
Views
44
I am working on a project using a NB screen and NX1P2 PLC. I am having a really hard time getting a real number to properly translate through to...
Replies
3
Views
114
Hi, I am facing an error inside Omron Network Configurator. I have 2 PLC communicate each other using ethernet cable, send signal using Network...
Replies
2
Views
97
Back
Top Bottom