Code Sample: Crimson 3.0 String Pattern Matcher

New here so not sure if this is allowed, but this is something I developed for a work project to enable the usage of USB barcode scanners with some input validation. It works with Crimson 3.0 HMIs(and auto-migrates to Crimson 3.1).



This is a testbed I prettied up a bit, I have bug tested it to the extent I needed to but it is probably worth testing any patterns that are critical before using them.



Usage looks like this:
pattern.isMatch(input string,pattern string) which will return a boolean true if matched, false otherwise.



Pattern syntax is in the comments and also on the "guide" button on the test page.


To use in your project, just copy the "pattern" program folder to your project. That's it! If you end up using it, just shoot me a thanks if you can.


Some screenshots here: https://forums.mrplc.com/index.php?...-30-simple-string-validation-pattern-matcher/
 
Thank you for posting, I will have a look when thing quiet down. RedLion really should have somewhere on their site so that people can upload stuff. Maybe there could be somewhere here.
 

Similar Topics

Hello everyone, As a controls engineer currently laying the groundwork for a new commissioning project, I am looking for some architectural...
9
Replies
382
Views
I am working on a project that requires communication between an Allen-Bradley PLC (CompactLogix/ControlLogix) and a Schneider ATV630 drive over...
1
Replies
1,098
Views
I have a OPC DA server (8 years old) that connects to another old program. We are updating the program, but still need to connect to the OPC DA...
3
Replies
3,161
Views
Hi All, I would like to ask you if possible to have some samples code for the realization of a software filter to be used in a PLC Micrologix...
2
Replies
3,032
Views
Anyone use the ModbusSlaveTCP.L5X for CompactLogix? I have it installed and cannot seem to set the Modbus (Instrument) ID. I'm expecting to set...
4
Replies
3,915
Views
Top