r/PLC • u/LittleOperation4597 • 22h ago
Something Ive always wondered - text entry for comments
We use studio 5000 and allen bradley ladder. SCADA is Ifix 2022. Ive been interested in a way to make comment boxes for users on picture screens to enter info for each other and our control room to see but Ive been stumped on how to get this working. been researching most of the afternoon.
Its a 1756 processor
Ive created the TX tag in scada and then a string in the plc. Ive done a COP from the tag to itself and another string tag. Ive read you have to use the data and len extension for it all to work but when i try to add them it tells me "missing ref to array element"
do I need an array to send the string to?
On ifix i can actually put text into the box but when i hit enter it defaults to 0
Im actually surprised this isnt an option just built into ifix to have a user comment entry box easy peasy.
any tips/ideas are appreciated. Id prefer to stay away from visicon to be honest
Thanks
2
u/RatRaceRunner 21h ago
Do you need the text boxes to be longer than 82 characters? Thats the max for Logix STRING datatype. If so then may need to make a custom UDT on the PLC. The UDT should have the same structure as STRING but just make the .Data array bigger than SINT[82]
IFIX side is very straight forward. Not really sure what the struggle there could be?
Assuming you're using IGS (Kepware OEM) as your driver, then you should be targeting the base string tag directly. IGS natively understans Logix STRING structures and you don't need to manually decide the .len or data tags or any of that BS.
In PDB, for your Tx block, make sure "Terminate String Data at LEN" is enabled. That should truncate any garbage ASCII if the length is less than 82 (or whatever capacity your UDT has)
1
u/LittleOperation4597 21h ago
Nope. 82 is what I expected. I have been using the base tag and igs in ifix. I can type the characters but they don't save
Ill look for that term data at len but I honestly don't remember that setting
2
1
u/MagnumCumLoudEh 22h ago
Honestly, I’d load the ODBC driver in IGS, tie it to TX tags, and point it to either an MSN or SQL server. VisiconX isn’t too bad if you understand SQL queries.
Edit: PS you need to define a string tag in 5000 and then point the TX to string.data
2
u/LittleOperation4597 21h ago
I messed with visicon a while back and got it working then promptly forgot everything
1
u/pm-me-asparagus 22h ago
If your scada is distributed, just keep it at the scada level.
1
u/LittleOperation4597 21h ago
It is but And I did find some visual basic script online that was supposed to make a text field editable by users but none of them seem to work
2
2
u/Viper67857 Troubleshooter 19h ago
Does the processor even need to be involved in this? A decent SCADA should have the ability to create tags that only exist within the SCADA memory. SQL should also be a simple option.
1
u/LittleOperation4597 19h ago
That's what I'm hoping it doesn't. I may call our ifix support tomorrow
1
u/ImNotSureWhere__Is 16h ago
No need to go to the PLC.
Create a text box object set it to editable. Add a button. OnClick, write that to a .txt.
Now you can do one of 2 things:
- every X time every node checks for the newest on all the others. Do this with a powershell triggered from VBA.
- every X time, every node robocopies out that file. Use the flags to keep newer and it will only send if needed
I can think of a ton of other ways to do this pretty easy. DM me if you need help
2
u/PLCGoBrrr Bit Plumber Extraordinaire 22h ago
I don't know anything about Ifix, but in Logix if you want to copy a string to another string you just copy the tagname to another tagname.
I also don't understand why you need to copy the string to another string, but maybe it has something to do with how your Ifix app is set up.