• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About bms

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. We are currently using HTTP.Get() to interface with an API to our work server, but it is about to be depreciated. Is there a HTTPS version available or planned?
  2. bms

    Alarm on comm timeout/cable unplug

    When using these comms objects, I can't seem to poll Input or Holding Registers in the 30000 to 50000 range. EG when asking for Input Register 30233: ModbusDevice.ReadInputU16(1,30233,2) The command that actually goes out is for Input Register 232 (00 00 00 00 00 06 02 04 00 e8 00 02). It's as if it is assuming I am using Modicon 30xxx 40xxx convention. Asking for 60232 correctly sends the right command: 00 00 00 00 00 06 01 04 eb 48 00 02. Is there a way to force it to evaluate my data addressing literally?
  3. Please add support for OAuth2 email authentication
  4. bms

    TWITTER Feed anyone?

    What are your thoughts?
  5. bms

    TWITTER Feed anyone?

    Our email server is Microsoft Exchange and only supports OAuth2. For the moment I'm just using Gmail instead, but it seems they are also standardizing on OAuth2; I had to manually enable "unsecure 3rd party access". If you don't send any emails for a while (about 24 hours it seems) then they automatically turn it off again, and I can't send anything. I suspect their long term view is to phase it out completely.
  6. bms

    TWITTER Feed anyone?

    Is there any plan for DF to support OAuth2?
  7. I'm trying to track down what I think is a memory leak. DF runs fine for about a day, then starts to error out that it can't run any sequences. Task Manager shows DF is using over 1GB of memory; up from about 150mb on startup. It looks to be an issue with my logging function, which is called every 10 seconds to write all tags to MySQL. Simplified version: try private MySQLHandle = DB.Open("dfsqlsource", "user", "pass") //for loops to create query, removed here for brevity private string SQLQuery = "INSERT INTO etc etc" DB.Execute(MySQLHandle, SQLQuery) DB.Close(MySQLHandle) catch() System.ErrorMessage("SQL Log All Error: " + strLastError) DB.Close(MySQLHandle) endcatch Am I using DB.Open() and DB.Close() correctly? Or is it something to do with the private variables staying in scope between function calls or something weird like that?
  8. This works OK: private string SQLQuery = "SELECT Data_Manager.Time_Stamp, Inverter.RemoteReady FROM Data_Manager JOIN Inverter ON Inverter.Time_Stamp LIMIT 1000" private FieldHandle = DB.Query(MySQLHandle, SQLQuery) ? DB.Field(FieldHandle, 1) But I get an error "O1004 Unable to run query" for this: private string SQLQuery = "SELECT Data_Manager.Time_Stamp, Inverter.RemoteReady FROM Data_Manager JOIN Inverter ON Inverter.Time_Stamp LIMIT 1000" private RO = DB.QueryToClass(MySQLHandle, SQLQuery) ? RO.FieldNames
  9. bms


    +1 for SVG, that would be great. I'm not having any luck getting WMF directly into the symbol component, either from the clipboard, or using the load image button. Is it supported?
  10. bms


    Is there a way to import vector graphics directly, or do you have to go via the symbol factory?
  11. bms

    Generate Alarms From Script

    Is there a way to dynamically create alarms from sequences, or do they have to be manually added in the alarm summary view?
  12. bms

    Alarm on comm timeout/cable unplug

    That's great, thank you. Do these objects also support ModbusTCP Slave? Also, I'm confused with variable scope in a specific situation: class ModbusClass local string IPAddress = "" local ModbusAddress = 1 local EthernetPort local ModbusDevice function Init() EthernetPort = new (CCommEthernet) EthernetPort.Address = IPAddress EthernetPort.Port = 502 EthernetPort.InitComm() EthernetPort.Purge() ModbusDevice = new (CCommDevice) ModbusDevice.PortObject = EthernetPort ModbusDevice.ProtocolName = "ModbusTCP" endfunction function Read(start, length, string type) ? format("IP Address: %s", ModbusDevice.IPAddress) return evaluate("ModbusDevice." + type + "(" + ModbusAddress + "," + start + "," + length + ")") endfunction endclass class DataManagerClass local Modbus function Init() Modbus = new (ModbusClass) endfunction endclass global DM = new (DataManagerClass) DM.Init() DM.Modbus.IPAddress = "" DM.Modbus.Init() DM.Modbus.Read(0,125,"ReadInputU16") The output is: The local variable IPAddress holds "" as I would expect, but why does ModbusDevice.IPAddress print Curiously, I do correctly poll the slave at
  13. bms

    Alarm on comm timeout/cable unplug

    Is it possible to call a Comm Device by referencing its underlying object? For example, switching between two different Modbus devices using a single wrapper: device.DataManager.Address = "" device.SafetyEquipment.Address = "" class ModbusStatsClass local Interface local Address function ReadModbus(start, size) return Interface.ReadHoldingU16(Address, start, size) endfunction endclass class DataManagerClass local WindSpeed local ModbusStats function Init() ModbusStats = new (ModbusStatsClass) ModbusStats.Address = 1 ModbusStats.Interface = device.DataManager endfunction endclass class SafetyEquipmentClass local LocalRemote local ModbusStats function Init() ModbusStats = new (ModbusStatsClass) ModbusStats.Address = 2 ModbusStats.Interface = device.SafetyEquipment endfunction endclass Global DM = new (DataManagerClass) Global SEIO = new (SafetyEquipmentClass) DM.Init() SEIO.Init() Private HoldingRegisters = DM.ModbusStats.ReadModbus(0, 125) // Do some stuff HoldingRegisters = SEIO.ModbusStats.ReadModbus(0, 60) //Do some other stuff
  14. bms

    Nested Classes

    Got it. Thanks for the detailed explanations; much appreciated.
  15. Is there an unsigned set register function? When reading I use ReadHoldingU16() but there doesn't appear to be a corresponding SetRegisterU16()?