New ✨ Introducing Oxmaint Asset Hub for Machine Builders and OEMs. Explore Now
Hello everyone, I am encountering an issue with double quotes appearing within selections instead of at the beginning and end. Below is the script, and I would appreciate assistance in identifying the necessary changes. Initialization Data Script: HDWDataDir = "D:\Data Logging"; {The log files are located in the History directory} HDWDBDir = "C:\Users\Public\Wonderware\Intouch Applications\Patching SIP"; {The application directory} HDWStartDate = "02/01/2024"; HDWStartTime = "11:00:00"; HDWDuration = "1h"; HDWInterval = "1m"; HDWFilename = "C:\Temp\H1.csv"; HDWTags = "$date,$time"; Tag Selection Script from historical data: SelectTags= HTSelectTag(); HDWTags= HDWTags + "," + SelectTags; Please refer to the provided image for clarification. Thank you for your help.
For effective SEO strategies, it is crucial that HDWTags is formatted as a message tag. The correct format for HDWTags would be: HDWTags = $DateString + " " + $TimeString.
In response to a query, muusic_man suggested that HDWTags should be formatted as a message tag like this: HDWTags = $DateString + " " + $TimeString. However, a recurring issue with double quotes persist when selecting the tag. The script has been adjusted accordingly. Please refer to the attachment for further details.
RockyNivas expressed gratitude for the reply. The HDWTags message tag has been modified in the script, but there is a recurring issue with double quotes appearing every other time the tag is selected. Please refer to the attachment for more information. Don't forget to check out the updated script.
Robertmee asked for the updated script to be displayed. Here is the script provided: Initialize Data Script: The HDWDataDir is set to "D:\Data Logging", which is the directory where log files are stored. The HDWDBDir is set to "C:\Users\Public\Wonderware\Intouch Applications\Patching SIP", which is the application directory. The HDWStartDate is "02/01/2024", the HDWStartTime is "11:00:00", the HDWDuration is "1h", the HDWInterval is "1m", the HDWFilename is "C:\Temp\H1.csv", and the HDWTags are identified by $DateString + "" + $TimeString. Select Tags Script: The SelectTags function is called to retrieve tags. The HDWTags are then updated with the SelectTags information.
Do you want to showcase the tag names or their actual string values on the final line of your display? If you wish to display the tag name in your string animation, consider using Tagname.Name instead of Tagname. This will help you accurately depict the tag names in your animation.
Robertmee asked for an updated script. Are you looking to display the tag names or their string values on the last line? To show the tag name in your string animation, use Tagname.Name instead of Tagname. I am aiming to display the tag names. When I press the Initialise button, default values will be filled in the SCADA page, as shown in the previous images. Pressing the select button will navigate me to the logged data tag page, like the user definable trend. I can then select multiple tags. However, I am encountering issues with commas and double quotes appearing after every tag instead of at the beginning and end. Thank you.
RockyNivas mentioned a process of displaying Tag names on the SCADA page. By pressing the Initialise button, default values will be populated as shown in previous images. Subsequently, selecting the Select button will navigate to the logged data tag page, where user-definable trends can be viewed. Users can freely choose tags, separated by commas and double quotes. Make sure to click on the Tagname.Name for the desired outcome. Thank you for your attention.
Answer: - This issue may be due to how the concatenation of strings is being handled in the script. Check for any errors in adding the double quotes at the beginning and end of the selections.
Answer: - To fix the issue, ensure that the double quotes are correctly placed at the beginning and end of each selection. Review the concatenation of strings and verify the placement of double quotes in the script.
Answer: - You can carefully review the script and pay attention to how strings are being concatenated and formatted. Check if there are any missing or misplaced double quotes that are causing the issue.
Answer: - When concatenating strings in scripts, make sure to properly include double quotes where needed. Consider using escape characters or different methods of string manipulation to ensure correct placement of double quotes.
Answer: - The Tag Selection Script could potentially impact the concatenation of strings in the Initialization Data Script. Review both scripts to see if there are any interactions or dependencies causing the double quote placement problem.