Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - wittmane

Pages: [1]
1
Technical support / Nano-10 Ethernet Duplex
« on: August 14, 2014, 07:06:22 AM »
I can't find in any of the documentation where it says whether the Nano-10 supports half or full duplex for ethernet connections. Does anyone know what it supports?

2
Technical support / Read values in Nano-10 from another web page
« on: August 11, 2014, 02:06:27 PM »
I have some JavaScript code to read the value of DM[1] in my Nano-10, but it uses
Quote
HOSTLINK
which I'm not completely sure what it is. It appears to be some relative path dealing with the device, but I would like to make absolute, so that I could call the command from a separate web page.

Here is my JavaScript Code:
Code: [Select]
function h2d(h) {
  var val16 = parseInt(h,16)
  if (val16 > 32767) val16 += -65536
  return val16
}

function timestamp(){ return "?%0C"+new Date().getTime()}

function createXMLhttp() {var xmlhttp;
  /*@cc_on @*/
  /*@if (@_jscript_version >= 5)
     try { xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}
     catch (e) { try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}
          catch (E) {xmlhttp=false}
     }
    @else
     xmlhttp=false
    @end @*/

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
     try { xmlhttp = new XMLHttpRequest()}
     catch (e) { xmlhttp=false}
  }

  if (!xmlhttp && window.createRequest) {
     try {xmlhttp = window.createRequest()}
     catch (e) {xmlhttp=false}
  }
  return xmlhttp
}

function errormsg(txt){alert("Connection Failed:"+txt)}
var errCount=0

function checkSvrResp(xmlobject, from){
   if (xmlobject.status!=200 || xmlobject.responseText==""){
     errCount++
    if (errCount > 3) {alert("Server Error!");return 0;}
    else return 1
   }
   errCount=0
   return 1
}

function getTemperature(){
  var cmd = "HOSTLINK/RD00010014"+timestamp() // read first 20 DMs (max 50 in one read)
  var xmlhttpObj=createXMLhttp()
  xmlhttpObj.open("GET",cmd, true)
  var DM = "Nothing..."
  try {
    xmlhttpObj.onreadystatechange=function() {
      if (xmlhttpObj.readyState==4) {
        if (!checkSvrResp(xmlhttpObj,"getTemperature")) return
      dataStr = xmlhttpObj.responseText.substring(4)
      DM = h2d(dataStr.substring(0,4))
      // display the temperature
      document.getElementById("Temperature").innerHTML = ""+DM
      setTimeout(getTemperature, 10000);
      }
    }
    xmlhttpObj.send(null)
  } catch (e){errormsg("Failed at getDM"+e)}
}

The code is essentially just a stripped down version of the pre-built webpage. It does exactly what I want when run through the Nano-10, but I want it to be run through some other device. I feel that the
Quote
HOSTLINK
(in the getTemperature function) should just change to an IP address, or some slight modification of that. Any help would be appreciated.

3
Technical support / Read data from webpage
« on: August 11, 2014, 07:32:53 AM »
I have another device that I am using for the primary webpage, but I want it to get some readings from my Nano-10. I was thinking using ajax on the other device would be nice, but looking at the pre-made webpages, it seems that the data from the Nano-10 is displayed through the use of JavaScript, which wouldn't work for getting that through an ajax request. Is there some way to send the data directly so ajax would work or have some other way of sending the data so that another device can read it and display it through the use of html and JavaScript?

4
Technical support / Re:Multiple Email Recipients
« on: July 18, 2014, 01:36:26 PM »
Here is what I have:
Code: [Select]
PRINT #4 "<EMAIL email1@example.com>"
PRINT #4 "SENDER: myemail@example.com"
PRINT #4 "SUBJECT: Email"
PRINT #4 "Body"
PRINT #4 "</>"

PRINT #4 "<EMAIL email2@example.com>"
PRINT #4 "SENDER: myemail@example.com"
PRINT #4 "SUBJECT: Email"
PRINT #4 "Body"
PRINT #4 "</>"
I would rather not do all of that twice, but if I have to, I can deal with it. The problem is that only email1 is receiving the email. I flipped their order, and the first email is the only one that goes through. What am I doing wrong?

5
Technical support / Multiple Email Recipients
« on: July 18, 2014, 09:06:07 AM »
I have a Nano-10 and I want to send an email out to multiple people. Is there any way to send it to both simultaneously or CC someone. The only way I can think of is to send the same email multiple times, just with different recipients, which I would rather not do. Is there some more efficient way of doing this?

Pages: [1]