Russ Is Not Happy Again Posted August 16, 2019 Report Posted August 16, 2019 (edited) I can find no information on the string function usage. This seems to be not included in the manual. I need to do string manipulation. Sifting thru all of the internet for answers is making me not happy again. Time is money. If someone out there has this information could you please post it. Thank you in advance. Edited August 16, 2019 by Russ Is Not Happy Again Had more to say
MVP 2023 Joe Tauser Posted August 17, 2019 MVP 2023 Report Posted August 17, 2019 Yes, I'm not happy about that missing from the Help, either. I have found answers to a lot of questions UniLogic functions in the UniLogic Examples. I'd highly suggest downloading them: https://unitronicsplc.com/Download/Support/UniLogic/UniLogic_Example_Projects.zip I have attached one of the examples from the "Strings" directory. Which block are you having trouble with? Joe T. UniStream_070_String_Tools.ulpr
Russ Is Not Happy Again Posted August 17, 2019 Author Report Posted August 17, 2019 Thanks Joe After some experimentation I got my string manipulation to work. I am a first time user of Unitronics. I come from the Allen Bradly word. My old bag of tricks don't work well in Unistream world. I get frustrated!! I have been using the sample files. They help some. But I still find the instruction set a bit lacking on information. For instance, The documentation did not indicate that not only will the "Store DTI to File" instruction create my .csv file but also a .csv.zip file. I needed to append the date and time to end of the customers job name. I need a unique file name that I can use to save shift production data to a memory stick. So this happened. I take from the customers spreadsheet the job name as found, (5/4 x 8 Rab Trim w Window and Side Pocket) Correct for the slash and add date and time for this as my file name, (5_4 x 8 Rab Trim w Window and Side Pocket 8-17-19_11-30AM) Add the extension, (5_4 x 8 Rab Trim w Window and Side Pocket 8-17-19_11-30AM.csv) 61 characters, I made it under the limit. But this really happens in the instruction unknown to me, (5_4 x 8 Rab Trim w Window and Side Pocket 8-17-19_11-30AM.csv.zip) If somebody would have just said you also getting a .zip file I could have saved my self a couple of hours figuring it out the hard way. Now, do you know of a way to make a LIFO Stack not get full. I cant believe this instruction does not have an unload word at it's natural end. Thanks
MVP 2023 Joe Tauser Posted August 18, 2019 MVP 2023 Report Posted August 18, 2019 I've programmed many PLC brands, including Allen Bradly back to the PLC 5. I still do and have a current Tech Connect Contract. And I still get sticker shock if the end user specifies it must be an AB system. If AB is all you've ever known I can totally understand your frustration. The $3K RSLogix 5000 buy-in and the $900 annual country club dues go a long way for paying for a deep and thorough support system. UniLogic is a very different and powerful animal. It's still evolving. <rant> Strings and CSV Files and VNC! Oh, my! The real challenge is that many people are now demanding that their Programmable Logic Controllers act like a PC. But still program in ladder logic. Without nice features like included libraries for complex functions or API calls. So they come up with function blocks that try to cover the bases faster than their limited Technical Writing Staff can document everything. Test it. Ship it. Invoice it. We'll document it later. This is not unusual in the corporate world. Somehow we've got to pay those R&D people. With all that, UniLogic is still free and the UniStream is a really good bang for the buck. There's just pain from time to time. </rant> 11 hours ago, Russ Is Not Happy Again said: Now, do you know of a way to make a LIFO Stack not get full. I cant believe this instruction does not have an unload word at it's natural end. I'm guessing you already know that data tables are the easiest way to make a stack. If you use a DTI type data table and use the Insert Row to DTI instruction and insert your new data struct at row 0 it will push all the data down and drop the bottom one off. Is this what you're trying to do? Joe T.
Russ Is Not Happy Again Posted August 18, 2019 Author Report Posted August 18, 2019 Thanks Joe I did find the DTI Insert instruction. That let me buffer data while I let the real save to file instruction execute. I'm writing 3600 row files and I didn't want to chance data loss during the save. I've been on many PLC platforms During the course of my career. Got my feet wet on Texas Instruments 5TI Sequencer. You Haven't lived until you lugged an Allen Bradley 1770-TA thru an airport. Then ICOM came along and solved that. I just revealed my age. Dammit Anyway, Long story short. My predecessor for this project dropped the ball. I started 2 weeks behind. But I think I'm 90% done. It's been an adventure. On the HMI side I just built the ugliest thing I ever built. There has to be a better way. I miss embedded variables, Maybe a drop down list. I don't know. I end up with 17 screens to get the customer to the part they wish to run. UGLY!! - I HATE IT!! - TOOK WAY TO LONG TO BUILD!! When I am in the HMI side I can see this layers thing. What are they and how do you use them. I could ask a million questions. Thanks for you time Joe Russ @maybe a little bit happier now .wtf
Sime Posted June 15 Report Posted June 15 Hello After 4 years, there is still no Help file for Strings in UniLogic SW .... Does someone know what are the Input Tags A-F for "Replace String" block?
Saragani Posted June 17 Report Posted June 17 You have a tooltip when you hover each of the inputs / outputs: A - Source String B- Substring to find C- String to replace D - Start index E - Times to replace F - Destination String
Sime Posted June 17 Report Posted June 17 I will add the question here.... Is it possible to Create a String constant in Unilogic SW? Thank you. Simon
MVP 2023 Joe Tauser Posted June 17 MVP 2023 Report Posted June 17 Make a string tag and select the powerup value check box. Then enter the "constant" value. Joe T.
Saragani Posted June 18 Report Posted June 18 Yes, just create a string tag and check the "Constant" checkbox You can also use a constant value on tags assignments that can accepts const string, by wrapping the text with "", or #"" (the # is added automatically when just entering ""), for example:
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now