AzeoTech

Administrators
  • Content Count

    5,686
  • Joined

  • Last visited

Everything posted by AzeoTech

  1. The Trilogi error is a little unusual. I do not believe it is included in the installer anymore. It must be referenced in your document somewhere. You can send the doc to us and we can quickly check. Initcomm() just tries to get access to the serial port for communications. It does not actually send anything over the line. It's kind of like picking up a phone and listening for a dial tone. It does just that, but doesn't actually make a call, or talk with anyone. If the serial port doesn't exist, or is being used by another application it will throw an error.
  2. Section 12.7 of the user's guide covers this. Take a look and post any questions that might come up. Note that DAQFactory is subject to whatever firewall settings you have in Windows, so if you can't get it to connect, it is probably because your Windows firewall settings aren't allowing the ports (2345 - 2348 if I remember correctly)
  3. If you really want to do error handling on the comms you should probably switch from using Channels and Timing to using a little script. You can still use Channels to store your data, but you would use a little script to collect the data. Something like: while(1) try private myData = device.myDevice.ReadHoldingU16(1,0,1) myChannel.addValue(myData) catch() ? strLastError // do something else if it fails endcatch delay(1) endwhile Channels and Timing does its own error handling. It prints the error to the command/alert and tries again next time. There is nothing wrong with those error messages, but if you want more, you have to revert to script. I should add that if you have multiple devices, and one is timing out, it will slow down acquisition for the other devices. For this, I suggest using the Offset parameter to stagger the reads across multiple threads. Use a different Offset value for each device, though if you have multiple devices on a single 485 chain, you should put all of them on the same offset.
  4. There's nothing glaringly wrong in your document, though you should watch your indentation. Though that won't affect the way DAQFactory, it does affect how readable your code is. Also, your giant boolean expressions can be written much simpler. You can use bit math to quickly tell if 4 bits are in a certain configuration, just & the value with 15 and compare. So, if you want all 4 bits off, just do: (S1 & 0x0f) == 0 For any bits 0-2 on and bit 3 off, do: ((S1 & 0x0f) < 8) && ((S1 & 0x0f) > 0) I also would do a for loop and use evaluate() to check all 67 items if I stuck with S1-S67. But if you had S1-S67 in array called S with 67 elements [0] -> [66], it gets even simpler and you can pretty much do it in a single line: All of the 4 LSB's off for the entire S array: max(S & 0x0f) == 0 Any bits 0-2 on and bit 3 off: min(((S & 0x0f) < 8) && ((S & 0x0f) > 0)) == 1
  5. AzeoTech

    RS485 hyperterminal connection

    Why are you doing readUntil(35)? ASCII 35 is the # mark and I don't see a hash mark in your input stream. You should be doing ReadUntil(10) which is the last character in your input string, a line feed character. You are getting Timeouts because DAQFactory is waiting for the # which never comes.
  6. AzeoTech

    RS485 hyperterminal connection

    There are a number of posts on this forum on how to do this, and it depends a bit on what the code is and what the response is. Here's one for example: If you can provide more detail about what you send and what you get in response I can better help.
  7. AzeoTech

    Ethernet TX but no RX

    You might just need to reinitialize the ethernet port. The easiest way is to simply open the configuration window where you set the IP, then click OK. Also, do you have DAQFactory setup as the client or an Ethernet server? Do you by chance have a DLL with that device that you could use instead of direct Ethernet?
  8. Sorry, did you send me the ctl doc? Its been 6 months so could you send it again?
  9. AzeoTech

    Graphing a virtual channel on X and Y axis

    Try auto-scaling. Also make sure your Bottom axis is set to Lin, not Date/Time. If those don't fix it, do a Save with History when you have some data, and post or email us the document at support@ so I can see what you have.
  10. That depends a little. What data rate are you hoping to achieve? How many channels? Are you connecting over USB or Ethernet? What sort of math are you going to do?
  11. AzeoTech

    Configuration file at startup

    You had #2 done in the document you posted, so all I changed was #1.
  12. AzeoTech

    Configuration file at startup

    The problem is the second line in your class declaration: local debug = That is invalid. You either need to give it an initial value or don't include the = sign.
  13. I'm not quite sure what you are doing, but as an alternative to the Set To action you can use a quick sequence and the system.EntryDialog() function. Something like: private datain = system.EntryDialog("Enter some data:", minVal, maxVal) if (!isempty(datain)) outputVar = datain endif minVal and maxVal are optional.
  14. AzeoTech

    Time since restart

    %j is day of the year. There is no 0th day of the year, so it always starts at 1. To do it you'd need to split it: "D: " + floor((SysTime() -(v.time_of_last_restart[0]))/86400) + FormatDateTime(" H:%H M:%M S:%S",SysTime() -(v.time_of_last_restart[0]))
  15. The latest build of DAQFactory (but I'm not sure about the latest release) adds several options to the HTTP.Get() function. That function now looks like: response = HTTP.Get(URL, [remote path], [port], [extra headers], [secure], [get headers]) URL is the URL without HTTP:// and without any path, so for example "www.azeotech.com" Path is the path on the server, and defaults to "/" Port defaults to 80 extra headers is a string with any extra headers you want to add. They'll need to be formatted as if they were in the actual header as I believe they are just injected into the default headers. Windows handles this. Secure = non-zero does an SSL connection (https://). If 0, it is a straight HTTP connection If [get headers] is supplied and non-zero, then response is a 2 element array. The first element is the response content, the second element is the headers for the response. If [get headers] is 0, or not supplied, then response is just a string with the content.
  16. AzeoTech

    Page Draw Lag-High Latency

    Any chance you can either post your .ctl document or email it to us at support@ along with which page is causing you the troubles? I should then be able to quickly find the culprit
  17. AzeoTech

    Install fails on Windows 7

    Hmm, that is very odd. No direct ideas. Any chance I can remote into your system at some point and see? Just email us direct at support@
  18. AzeoTech

    User Graph Interaction

    You can try adding: yAxisFrozen = 0 xAxisFrozen = 0 to the OnPaint event for the graph. They'll still be able to pan / zoom, but then it will instantly jump back to the programmed scaling.
  19. AzeoTech

    Common script for similar component type

    If you select multiple components, both the Event and the Properties docking windows will edit values for all the components at once. It is one of the advantages of using the docking Properties window over the popup component properties, though some things are not accessible from the docking Properties.
  20. AzeoTech

    Thaw and Freeze Graph using code

    Yes, but it is a variable not a function: component.myGraph.YAxisFrozen = 0 will unfreeze the Y axis. Set to 1 to freeze it. There is a corresponding X version.
  21. AzeoTech

    MySQL error for logging

    Is your ODBC data source actually setup correctly? Judging by the error message, it seems like you created the ODBC data source called "FDB", but then didn't actually link it to the database.
  22. AzeoTech

    Asking password before setting a component

    Email us directly and I can get you a link to the beta.
  23. AzeoTech

    Asking password before setting a component

    There is in the next release, which will probably be in January. It's not quite "this" as that returns a pointer, but rather a string that returns the component name, called, appropriately, "ComponentName". So you can pass this to a common function, then use execute() or evaluate() to access the component by name.