Logix5K - Possible to Enable/Disable a Periodic task programmatically?

The RSLogix5000 Trend tool will allow 10mS timebase, but will only allow up to 8 tags per trend.

Two trends of 5 tags each ???
 
The "PLC way" to disable code is to put a -|/|- contact on the rungs that you're interested in.

That doesn't "disable" the code at all, it will just make the rungs false (if the BOOL is TRUE), but the code will still be scanned, not the same as "disabling" it.
 
Whoa !!

Hold on a minute.....

10 tags, sampled every 10mS isn't going to give you much recording time.

Say each tag was a DINT or a REAL, they are 32-bits, or 4 bytes each.

100 samples per second will therefore be 400 bytes per second.

400 bytes per second is 24,000 bytes per minute, or 1,440,000 bytes per hour.

But that is only 1 tag, you want to store 10 tags, so that would need 14,400,000 bytes per hour.

Your L43 Controller only has 2MB of memory, so clearly you are not going to be able to do this, even for 1 hour, let alone "... a few hours... ". A few minutes is all you are going to get, and that is with not much code and other tags in the controller. Also each data-point will need its own array tag, since the size limit of a single tag is 2MB.

You are going to need an external data capture/historian to achieve this.


Hi Daba,

I am doing this with a bit of trickery. I came upon the idea after looking at AB's code for logging data in to their CF and SD flash cards. However, I didn't like the idea of having to have the customer remove the Flash card from the CPU in order to get at the data. So I created a structured text routine (similar to AB example), that grabs Date, Time including milliseconds and data from 10 real tags and copying them to a string array which was sized to 1500 elements. Which gave me 15 seconds of data to work with and took 123K bytes of Memory from the CPU. (more on this a bit later). Each of the 10 Real tags holding data gets put thru an RTOS function in a structured text routine along with a string find instruction for locating the decimal place within the resulting string of each tag. Then I tell it to grab x number of digits after the decimal place. (This was done with a 10 element array of constants indicating the #of decimal places to grab for each data tag). I did it this way because all other methods yielded more than 1, 2, or 3 decimal places than what I needed. Then the final resulting string is copied to one element of my DataString[1500] element string array if the length of it is<= 82 bytes. If it was greater, data was simply ignored and a carriage return and a line feed was returned to that position of the array. Also, the sting is formatted so a comma is added between each field unless it is the last field where it gets carriage return and a line feed. So the data string is already CSV ready. Finally, the index variable that keeps track of the array position is incremented by one during each scan and when it reaches 1500, index is set to one again.

Grabbing the data.......

I created a custom HMI using VB Net and Automated Solutions Ascomm.Net control which allows you to communicate with AB and other PLC hardware with your .NET based applications. This thing is impressive. I can grab all 1500 elements of my string array from the Compactlogix and copy it to a single string in my VB application in less than 200ms and also dump it to a text file just as fast. However, I am pacing myself and only grabbing the data at 7.5 second intervals. In other words, PLC is telling my VB program via another tag that data is ready when my array index reaches 749 and at 1499 so I copy /append the data from this array (0 to 749 or 750 to 1499 elements) to a single string variable and allows it grow up to 100 KB in size before saving it to a text file. If the text file gets more than 2MB in size, a new one is created. If the customer stops the test in between the intervals of 749 and 1499, it just grabs the contents from 1 to stop time index or from 750 to stop time index and writes those values to the text file. Then finally, it changes the .TXT extension of the text file to .CSV extension. Now you can open up the data file in Excel and format the first column to date and the second column to time including milliseconds. The reason keeping the file in .TXT format until done was to allow the customer to open the file in a utility I wrote in VB along with a data grid control to view current data. If the file was in CSV format, I wouldn't have been able to do that and still allow the file to receive incoming data without other locking/unlocking mechanisms. So far, this has been working at my office without any issues for about a week now and it hasn't missed grabbing a line of data during that time.

Cheers
 
Last edited:

Similar Topics

Hi all, I'm starting work on a system and the processor for said project is a Control Logix 1756-L82. When I open Logix, however, that CPU is...
Replies
9
Views
2,897
Hello, I have been working on an alarm tracking routine. I take several bits to get a status of a device and load then into an INT Dev_Stat. When...
Replies
0
Views
999
Hi all, I'm working on some Control and Compact Logix A&B PLCs, running Logix5K version 24. I've been doing online edits just fine, but I've...
Replies
6
Views
2,376
From what I can tell, AB's Connected Component Workbench (CCW) does not support CompactLogix L43 with RsLogix v20.xx Software. What are my...
Replies
6
Views
2,655
Hello PLCs.Net! I am trying to use RSLogix5k via windows command line. I would like there to be a script which automatically opens a project...
Replies
1
Views
1,233
Back
Top Bottom