Go to the Project Settings (nut icon). You should get Auth Token in the Blynk App. #define BLYNK_DEBUG // Optional, this enables lots of printsĬonst int wifiConnectedLED = 8 // the number of LED pin Her is my code: #define BLYNK_PRINT Serial // Comment this out to disable prints and save space Having some trouble trying to do a simple data push from Andruino Uno to a virtual display on the Blynk App.Īrduino Uno R3 with ESP8266-01 (on version 1.1 and set baud rate to 9600) You probably find that I'm complaining for nothing, it's probably true (certainly depends on where we got "ours marks" in programming).A new user here…having a blast with Arduino and Blynk…but also not without some noob frustrations. One would expect the same treatment regarding "time". (VBS script can convert I think, I have not try)įor example, for dates, we have plethora of datatype (Date, TOD, LTOD, DT, LTD and DTL), and a dedicate tool (date/time field and clock) on the HMI side. To count "time", I found the Ltime suitable, unfortunately it is not implemented on the HMI side (and not in 1200 series) easily. I maintain that in general, it is better to use the correct datatype. It doesn't change the others points (which are more personnal opinions). #hours := #hoursAll MOD dword#24 //hours of last non-full day #min := #minAll MOD dword#60 //minutes of last non-full hour #minAll := #inTimeSec / dword#60 //minutes #sec := #inTimeSec MOD dword#60 //seconds of last non-full minute converts a DWORD (time in seconds)to ddddd:hh:mm:ss string StartPos : DInt // aHMS index to start copying from InTimeSec : DWord // time to convert, in seconds Maybe I take the problem upside down, and Ltime is a format to be using with timer, not a format to save "time" in general.ĬPU side, it's easier to use LTime:= Ltime + LT#1s instead of coding a self clock, but if it's impossible to display this format on HMI side. You can see on my attachment that is not the case, not at all.Ĭonversion to Time, working until you exceed 1Day (expected)Ĭonversion to Lint, working as seconds, and the number is completed by zero on the right.don't really know why, and I find nothing to re-convert to something usefullĬonversion to Dint and Dword,I did not expect much A change in sign has the result that the enable output Is transferred unchanged right-justified and interpreted as nanoseconds to theĭestination data type. In the help, I can read for "explicit conversion of LTime" : Here, I have a 1500 with a TP1200 comfort, but my question is for all the CPU we are using (1200, 1500) but LTime is 1500's only.ĭo I have to make a "DIY life time saver" ? I was expecting something like : "LTime.day" "Ltime.hour". I can eventually use 4 tags (int) in different I/O field : Days, Hour, Minute, Seconds but I don't know how to convert, in the CPU, LTime to this differents tags (perhaps convert to Lint, and use math) It is working, now I want to display it on the HMI, if I use an I/O field directly, it is a "second format" (I try decimal, string.), don't really usefull. LT_TIME := LT_Time + t#1s (LTime because it can go to 106751 day. I want to save the machine life time (only when effectively running)įor this, I use a simple pulse (1s) when my machine is running
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |