Jump to content

Recommended Posts

  • MVP 2023

I'm working on a program that tests 32 motors with one of eight tests.  All eight tests can run at the same time, and any of the motors can be assigned to any test.

 

I've already developed the code to edit the tests in one data table and assign test numbers to each motor in another data table, along with leaving space for each motors test data.

 

These tests are not fast - the motor is on for several hours and then off for hours (pool and spa pumps) for several thousand cycles.  I'm just monitoring high and low amp levels.  Response time is not critical.

 

Here is my monster-brain idea - I can make a program with pointers that will step through the test table, determine the test members, check the current levels, and write the time accumulators and error codes back to the test table and the motor table.  This way I only need to write one test routine, loopy and convoluted as it may be.

 

The question I have is whether extensive data table reads and writes are any harder on the memory and scan time than regular operations on MIs and MBs.  I figured if I run the loop every second I will have ample control over the test.

 

Or I can write eight nearly identical test routines, which will be simpler but can be a pain in the butt to edit when I figure out that my initial genius programming ideas don't work. (Yes, that does happen).

 

Thoughts and comments?

 

Joe T. 

Link to comment
Share on other sites

  • MVP 2023

I frequently read and write to data tables, even multiple simultaneous writes within the same scan, and have found no evidence that the PLC can't keep up as well as regular MI memory operations. Obviously if you have some critical operations, you might want to run some tests to confirm, but I think you will be successful.

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...