dan_lorentz Posted May 17, 2011 Report Share Posted May 17, 2011 I am working on a project that I have to pull timer information from the data tables and send it to an SD card. I found the T - ASCII function block under the strings menu but wasn't able to find any information in the help section. The block seems very straight forward but I can't seem to get the output of the block to change as the timer value changes, see the attached jpegs. The timer that I am trying to convert has a value of 99:59:59:99. One thing that I thought that might be the issue but can't find any information on in the help section is the Offset in the Vector. I made the assumption that since I will be sending this value to an Excel file eventually that the best solution was to click the excel option of a const. of 1000. I also adjusted the format but the output value did not change then either. Then I changed the Preset/Current option and nothing changed. I then changed the remaining/elapsed option but nothing changed still. I have played with having the string address destination be both MI (dec and hex) and ML (dec and hex) but the values did not change. My final goal is to be able to take the value from this block and send it to the SD card via the Create Excel Delimited Line block. Am I having a race in the logic and not allowing the block time to operate, does the block not work, or have I missed a simple set-up step. Thanks, Dan Quote Link to comment Share on other sites More sharing options...
Stein Yair Posted May 19, 2011 Report Share Posted May 19, 2011 Hi, Attached is an example application I made for you. I hope it clarifies how to use the Timer to ASCII function. Timer to ASCII.vlp Quote Link to comment Share on other sites More sharing options...
dan_lorentz Posted May 25, 2011 Author Report Share Posted May 25, 2011 So I have the block working now and can see the timer in ASCII format thru the PLC. The next stage that I am having trouble with is taking the MIs that provide the time and sending them to an SD card. Should I take the ASCII and convert it back to a number? Thanks, Dan Quote Link to comment Share on other sites More sharing options...
dan_lorentz Posted May 26, 2011 Author Report Share Posted May 26, 2011 I was able to use excel commands and macros to convert the time to a understandable number. However, the lastest issue is when I pick a MI to have leading zeros in the Create Exce Delimited Line function block the leading zeros aren't up in the .CSV file. Anyone have input? Thanks, Dan Quote Link to comment Share on other sites More sharing options...
DonM Posted June 3, 2011 Report Share Posted June 3, 2011 Hi Dan, What are you doing with the produced CSV files? If you are opening them in Excel, Excel automatically drops leading zeroes (at least my 2003 version does). Don. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.