Cscape Horner ocs problem

Unregistered

Guest
U
Hi I`m creating a gas sampling programme using a
HORNER NX251C OCS.
Using a Cscape version 7 application.
The ocs writes to a compact flash card inserted in the unit. The ocs displays a trend for 4 gas samples (historical).Comms are o.k. The data logging is the problem.
As the logging requires the following data written to a compact flash card and displayed in excel.

date/time. sample1. sample2 etc>>>>>>>
" " value value value
" " value value value
" etc value value v> etc

The ladder logic is broken down in to 4 functions.These produce real values for the sec, hours, minutes date, by using INTEGER TO REAL FUNCTIONS. The 4 REAL values are then used in a Math Express -Real Function.

Unfortunately, Excel reads and calculates dates as from the year 1900.It produces a value e.g. 1900-2005 = 38,325.NOT a date?????????

So it writes a large number for the date instead of an Actual (date figure) as you would expect. Does anybody know of an Algorythmn to produce a date. Sorry if the description is a little vague.
Many many thanks.Hi I`m creating a gas sampling programme using a
HORNER NX251C OCS.
Using a Cscape version 7 application.
The ocs writes to a compact flash card inserted in the unit. The ocs displays a trend for 4 gas samples (historical).Comms are o.k. The data logging is the problem.
As the logging requires the following data written to a compact flash card and displayed in excel.

date/time. sample1. sample2 etc>>>>>>>
" " value value value
" " value value value
" etc value value v> etc

The ladder logic is broken down in to 4 functions.These produce real values for the sec, hours, minutes date, by using INTEGER TO REAL FUNCTIONS. The 4 REAL values are then used in a Math Express -Real Function.

Unfortunately, Excel reads and calculates dates as from the year 1900.It produces a value e.g. 1900-2005 = 38,325.NOT a date?????????

So it writes a large number for the date instead of an Actual (date figure) as you would expect. Does anybody know of an Algorythmn to produce a date. Sorry if the description is a little vague.
Many many thanks.
 
What I done in the scada application that I am creating for the date is just before the write to compact flash I have a routine written which is off the -(p)- type coil. I use this because the clock and date is continually changing. Anyway what I have done then is I use the n/o contacts of this coil and I trigger a line of code which changes the integer to ascii, so I take the hour and put the ascii into one register and then proceed to do the same on the min, sec, day, month and year. Just remember the year is 4 digits in the horner units. But then using some of the XOR and AND function I manipulate the data to add the colons and the slashes. Although if you know enough about excel you dont need to do this. But anyway it comes out everytime flawless on my compact flash and that is from an XLE, although i have tried it on an NX221 and it works there as well. If you would like I can post the section of my program that does this. Let me know.
 

Similar Topics

I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
Replies
0
Views
57
Hi I'm new on Horner PLC XL4 OCS using Cscape software. After establishing ethernet comm I can upload/download program to/from the XL4 just fine...
Replies
1
Views
1,207
Hi All, I am working on a PLC Program for the following Horner device: Series: XL Series Device Type: EXL10e Model #: HEEXV1E0 If you are...
Replies
1
Views
3,292
Hi does anybody have knowledge of compact flash cards that has trending samples to be formatted to Excel. The problem is Excel doesnt give you a...
Replies
0
Views
3,963
I seem to be making this harder than it should be, and Its not making any sense. I simply need to move a real variable to two integer variables...
Replies
8
Views
967
Back
Top Bottom