Replies: 5 comments 17 replies
-
That would be extremely helpful, thanks. If you want to do the full unit tests, in the tests directory is a L5X program export that has all the tags needed. The tests can be run with tox by
Logging to a file would be the simplest though using:
And now I think I'm going to add the file logging option to the |
Beta Was this translation helpful? Give feedback.
-
Okay I'll see what all I can do. For time's sake I might just run the full test on a couple higher FW versions, and some basic read/writes on others. It might take me a few weeks to get through everything I have, but I'll prioritize what you listed. I can definitely play around with it and log everything. I need to practice some coding anyway.
Do you want log files posted in the issues thread?
…-------- Original Message --------
On Feb 17, 2021, 9:42 PM, ottowayi wrote:
That would be extremely helpful, thanks. If you want to do the full unit tests, in the tests directory is a L5X program export that has all the tags needed. The tests can be run with tox by tox -e user , if you aren't familiar with tox I can help you set it up. That is going above and beyond though, simply reading/writing a few tags in each PLC would be more than enough. If you already have scripts running, testing them against the new version would be good too. I'm mostly trying to make sure that I didn't break anything. The first main thing I can't test with my devices is the use of instance IDs in the read/write requests, that requires a V21+ PLC. The other is the large connection/extended forward open that requires a V20+ and EN2T+ (or a newer CompactLogix). Those features are enabled automatically on connect, so just reading/writing a couple tags and sending me the logs would be enough to confirm they work. The new version provides a helper method to enable basic logging:
from pycomm3.logger import configure_default_logger, LOG_VERBOSE
configure_default_logger(level=LOG_VERBOSE)
Logging to a file would be the simplest though using:
from pycomm3.logger import configure_default_logger, LOG_VERBOSE, logger
import logging
configure_default_logger(level=LOG_VERBOSE)
handler = logging.FileHandler('pycomm3-test.log', encoding='utf-8')
logger.addHandler(handler)
And now I think I'm going to add the file logging option to the configure_default_logger method.
—
You are receiving this because you authored the thread.
Reply to this email directly, [view it on GitHub](#113 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/APTW4CUDPMI745POKKTM623S7R5AVANCNFSM4XZOAOWA).
|
Beta Was this translation helpful? Give feedback.
-
I'm not entirely sure what I'm doing wrong here, but I can't get reads or writes to work using V1.0.0. PLC is a 1756-L71 V24.11. Running the following code:
will only return I can successfully read the PLC Data using
|
Beta Was this translation helpful? Give feedback.
-
I don't have an EN2T in the lab like I thought I did, they've all been deployed. I have some newer CompactLogix processors to test extended forward open on, but all my terminal blocks have been robbed and I have to order some more. How would I go about using Tox to run unit tests? I just flashed a processor to V32 to try to run the full test set on it. |
Beta Was this translation helpful? Give feedback.
-
I didn't want to put this under the Issues tab since it's getting into some very specific use cases that might be outside of the scope of testing for V1.0.0, and it's a good possibility I'm doing something wrong. When sending a generic message to get the mac address of this switch, it returns an array of 6 USINTs. I've tried every data type that would unpack correctly with no luck. When attempting to use any 64 bit data type (LINT, ULINT, LWORD) it returns an error Ideas? |
Beta Was this translation helpful? Give feedback.
-
Is there a standard for how we should test devices, or are you just looking for anything?
I have access to L6/7/8 series controllogix and 1768/69/5069 series compact logix of any firmware after 17, along with tons of other EIP devices, all in a dedicated testing environment.
If you can let me know what you want to see in tests, I can knock these out as I get time at work.
Beta Was this translation helpful? Give feedback.
All reactions