I am new to CTI PLCs and currently working with a CTI 2500 PLC connected to an LED Display/Marquee. The PLC uses a specific command, SF, to display text on the sign. The code for displaying the time and date message is K201 % 2 STW141 :TIME " " STW141 :DATE K202 % 2. Currently, the date is displayed in the default format YY/MM/DD (e.g. 24/05/30). Is there a way to change this to dd/mm/yy format? Unfortunately, the CTI Programming Reference Manual does not provide information on date formatting. Despite claims from colleagues that it used to display in DD/MM/YY format, my attempts to manually format the date using variables (K201 % 2 STW141 :TIME " " V2125 V2126%2 V2127 V2128%2 V2129 K202 % 2) have been unsuccessful. Instead of the expected "12:00:00 D/MM/YY", the output shows "30 /24 /5" with no time displayed.
Hello Ekztal, According to the CTI manual, the TIME DATE print statement displays the date in the format YY/MM/DD, which may appear different to others. I have not personally used these statements and am unsure if they only function with status words. However, as the date and time are stored in STW141-STW144, you could attempt using Vmemory instead of the STWs. You can fill the first Vmemory with DD/MM, the second Vmemory with YY/HH, the third Vmemory with MM/SS (similar to STW143), and the fourth Vmemory with ms/weekday (similar to STW144). Please refer to the screenshot for further guidance. If this method does not work, you may need to create a date time message as you have already attempted. Please note that you are unable to merge parts of these two instructions. Kind regards, Henny
I am unclear about the new CTI instruction set. Can you explain the significance of the % 2 in the first two bytes?
2. To start with, print out the two characters stored in K201 from the example.
Ken Moore asks about the new CTI instruction set and the significance of the % 2 indication in the first two bytes. In my Programmable Logic Controller (PLC), the addresses K201 and K202 store the ASCII characters STX and EOT. These messages are transmitted to the LED sign via the RS-232 serial port, with each message starting and ending with STX and EOT.
Henny mentioned that the TIME DATE print statement in the CTI manual displays the date in YY/MM/DD format, which may appear differently to other users. If the standard STW addresses are not working for you, consider using Vmemory addresses instead. You can try filling the Vmemory addresses with the following combinations: DD/MM for the first, YY/HH for the second, MM/SS for the third (similar to STW143), and ms/weekday for the fourth (similar to STW144). If this method doesn't work, you may need to create a date time message using a different approach. For example, combining V addresses like K201 % 2 STW141 : TIME " " V2125 V2126%2 V2127 V2128%2 V2129 K202 % 2. However, be mindful that each address may contain blank spaces when displayed. If you're looking to extract only the last two characters from an address like V2125, consider exploring other coding options.
It looks like you're running into a common issue with CTI 2500 PLCs' date formatting. Instead of manually changing date formats, which often leads to errors such as the one you're experiencing, try to use the system's in-built conversion logic. If your system version supports it, use the TODDT command which converts time of day to ASCII text. Use this function in conjunction with STRING commands to reassemble fragments of the date in the desired format. Remember, PLC programming often requires to manipulate data into it’s raw format first before re-applying a different format. So, an essential part of resolving this issue lies in your knowledge about the individual components of the date value (day, month, year), and how they're represented in the PLC - that's where you need to start.
It sounds like you're having a tough time trying to adjust the date format on your CTI 2500 PLC system. While I haven't worked with this exact system, I've found in other systems that date format changes can sometimes be implemented at the system or OS level, rather than within specific software or an application. Is there a system-wide setting that might control the date format? Alternatively, have you considered using a different command that supports the format you need or using an external script to format the output? Just some avenues you might explore.
It sounds like you're running into a bit of a formatting challenge with the CTI 2500 PLC. Unfortunately, if the programming manual doesn’t specify how to adjust date formats, you're likely limited in that regard. However, you might want to try manipulating the individual components of the date using calculation blocks to rearrange them before sending them to the display. For instance, you could manually format the date by pulling in the day, month, and year separately, and then construct a string in the desired format before displaying it. Also, ensure that the variables you’re using are correctly mapped and formatted; sometimes it helps to do a quick debug to see what values are being generated. Good luck!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: - Unfortunately, the CTI Programming Reference Manual does not provide information on date formatting. Some attempts to manually format the date using variables have been unsuccessful.
Answer: - The provided code for formatting the date and time message might not be correct. It seems like the output is not as expected and does not display the time correctly.
Answer: - It appears that the current code (K201 % 2 STW141 :TIME " " V2125 V2126%2 V2127 V2128%2 V2129 K202 % 2) for formatting the date and time might need adjustments to display the desired format of "12:00:00 D/MM/YY".
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.