Daggos

Members
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Daggos

  • Rank
    Member
  1. Daggos

    ODBC Database alarm logging

    Hi, I cant get the date to work when logging alarms to database im using mariadb mysql this is what i get 0000-00-00 test Test;Test; 4 F with the logging sets i have set Custom Time Formatting to %Y%m%d%H%M%S , but i cant do that with alarms. -- -- Table structure for table `alarmlog` -- CREATE TABLE `alarmlog` ( `TheTime` date DEFAULT NULL, `Name` text DEFAULT NULL, `Description` text DEFAULT NULL, `Priority` tinytext DEFAULT NULL, `Status` tinytext DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; COMMIT;
  2. Thanks I managed to get it working with system.remotefull.GetHistory("HV_Power_Active", 0, 3600) remotefull being a full stream connection as it wont work with the lite stream. Also when i set the 3000 to 10,000 it downloads clearly from the persistence data and displays on remote version for a second or 2 then goes back to just 3600. (When i did this server HV_Power_Active history was set at 3600) So 3600 data points is good alot better than none. I guess if there is a way for me to save the data to persistence on the remote that would be good. I also change the history length for HV_Power_Active on the server to 10,000 so i can load up 10,000 points on the remote copy and it stays.
  3. I have a chart with expression HV_Power_Active [0, 3000] on the runtime copy
  4. Thanks, I have made a sequence on the remote pc with remotelite.GetHistory(HV_Power_Active, 0, 3000) But it isn't working, remote connection is called remotelite. I'm running on a non full stream
  5. Thanks have added to a sequence on start remotelite.GetHistory(HV_Power_Active, startTime, endTime) How would i use the start time and end time i figured with SysTime() for end time. I cant just put how many points i want?
  6. Sorry yes a remote copy runtime license
  7. Hi, Q1) With the remote license is there a way for it to use the persist file from the server? Remote will only show history of the time that its been running and way to use local persist files. Q2) If i cant use the persist files from the server can i make the remote use local save persist?
  8. 1 other thing how would i make New values in Bold text semail.strBody = "New values: " + CRLF
  9. Nice thanks i will use that.
  10. Ok this wont work either no email and daqfactory hangs private semail = new(CEMail) semail.strhost = "smtp.gmail.com" semail.port = 587 semail.strUserName = "xxxx" semail.strPassword = "xxxx" semail.strAuthenticate = "Auto" // open the file private.handle = File.Open("d:\DAQFactory\data.csv",1,0,0,0) // get the length private.length = File.GetLength(handle) // read the entire file and put into the body of the email email.strBody = File.Read(handle, length) // close the file file.Close(handle) semail.strReplyAddress = "xxxx" semail.strReplyName = "xxxxx" semail.strSubject = "xxxx" semail.strTo = "xxxxxx" semail.strConnectionType = "STARTTLS" semail.strSSLProtocol = "TLSv1_2" semail.Send()
  11. // open the file private.handle = File.Open("c:\mydata.csv",1,0,0,0) // get the length private.length = File.GetLength(handle) // read the entire file and put into the body of the email email.strBody = File.Read(handle, length) // close the file file.Close(handle) Found this on another thread i guess this would work? still would like to know if i can add more channels to an email direct
  12. Hi I'm using the below email script to send emails which is fine but i cant get more than 1 channel to show up in the email body. It will only show the last channel on the line? Do i have to set up an array? or another option is to save it to a file and send the file but i want it in the email body. private semail = new(CEMail) semail.strhost = "smtp.gmail.com" semail.port = 587 semail.strUserName = "xxxx" semail.strPassword = "xxxx" semail.strAuthenticate = "Auto" semail.strBody = "text " (HV_Power_Bulk_Fuel [0]) (Ventfan_Fan2_Vib_DE[0]) semail.strReplyAddress = "xxxx" semail.strReplyName = "xxxxx" semail.strSubject = "xxxx" semail.strTo = "xxxxxx" semail.strConnectionType = "STARTTLS" semail.strSSLProtocol = "TLSv1_2" semail.Send() Also another issue i dont seem to be able to send the average just sends the current value Mean(PS_2_Flow_Outlet[0,1600])
  13. Tried removing passwords still seems to be doing it. not sure what else to try. It works when i add the connection so its connecting and accessing data. But after save no good.
  14. ok i will give that a go once i get back to work.