dh53

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About dh53

  • Rank
    Newbie
  1. Today I tried to move a project to a new computer and I can't seem to install DAQFactory. The computer I want to use runs Windows 7 pro. I downloaded the latest DAQFactory installer, DAQFactoryInst_17_1.exe When I try to run it the installer splash screen comes up and I get an error "DAQFactory requires administrative privileges to install." The user account has administrator privileges on that computer. I tried to right click the installer and run as administrator but I get the same thing, splash screen then privileges error. I tried to right click, go to file properties, Compatibility, and set the file Privilege Level to "Run this program as an administrator." Same error. I moved the installer file to a directory C:\temp that is set so all users have full access to read, write, or modify. Same error. I don't really know what to look for in the log file. Near the end of the log file I see this (where xx:xx: is the timestamp): Action xx:xx:xx:LaunchConditions. Evaluating Launch Conditions Action start xx:xx:xx: LaunchConditions. DAQFactory requires administrative privileges to install MSI(c) (24:14) [XX:XX....] Product: DAQFactory -- DAQFactory requires administrative privileges to install. Action ended xx:xx:xx: LaunchConditions. Return value 3. MSI(C) (24:14) [xx:xx...] Doing action: FatalError" Any ideas why this is happening? Is there some other way to set administrator privileges? What is LaunchConditions 3 and does that tell me anything beyond the privileges error? Thanks
  2. dh53

    Get Serial / RS232 Data

    I spent some time with the user manual and am slightly better at sequences, then found an earlier thread about reading data from a scale over RS-232. The sequence I tried based on the earlier thread here in the support forum and the fact I only want data every 30 seconds was: private string datain private data while(1) try wait(30) datain = device.myDevice.readUntil(10) data = strToDouble(mid(datain,6,6)) weight.addValue(data) catch() ? strLastError delay(0.1) endcatch endwhile This works, sort of. Something is reading the serial RS-232 data and keeping it around in memory which I'm not understanding. The result is my sequence gives me the output of the scale from some time ago, if I change the weight on the scale the value in my variable "weight" does not change for a few minutes. My next attempt was the same except I added device.myDevice.Purge() right after the wait(30) thinking the data in memory would be flushed out. The result was a semi-success, the value written to the variable "weight" was now the current weight from the scale. I started logging data and then found the value of "weight" in the Variable-Value display was correct 80-90% of the time, but occasionally was "NaN". After an hour and 10 minutes of logging 8 data points (7 analog inputs and this one serial input) Daqfactory crashed. The logged data file shows the value of "weight", the one data point from the serial connection, is missing completely from the data file about every 5th time it is written. The data from the serial connection has its own time stamp and its own line in the data file separate from the A to D channels, I think this is as expected. The data file also shows the last write as it crashed it was trying to write this serial data. In looking at the code from the earlier thread it occurs to me I am not reading the serial data starting from the same point in the RS232 string so I tried this: device.myDevice.readuntil(10) // clear half frame´╗┐ In the example code in the earlier thread this is outside the While loop but it seems to me this should be happening with every read, no? I have put it inside my While loop so now I am running the following: private string datain private data while(1) try wait(30) device.myDevice.Purge() device.myDevice.readuntil(10) // clear half frame datain = device.myDevice.readUntil(10) data = strToDouble(mid(datain,6,6)) weight.addValue(data) catch() ? strLastError delay(0.1) endcatch endwhile I ran it for an hour with no more "NaN" values. It has just started logging so crossing my fingers it doesn't crash again. Question 1) was there something in my earlier code, like trying to write "NaN to a data file, that is obvious why it crashed? Question 2) is there anything obviously wrong with my current code? It has been logging now for 2 hours so I am feeling better about it by the hour. Question 3) if DaqFactory crashes again is there a logfile or any way for me to investigate why it crashed? Thanks.
  3. Hello, Complete newbie here. I have been using DaqFactory to acquire, view, and log analog data but now want to log data from a weighing scale with an RS-232 interface. I am able to add the new serial device using Quick->Device Configuration->New Serial(RS232... After some messing with the settings I am able to communicate in DaqFactory so that I can send the command in Comm Monitor "N\013\010" which this particular scale interprets as "send net weight- carriage return". I get an ascii response with the correct weight in Comm Monitor. Also I can set the weighing scale to output data continuously and when I look at Comm Monitor it is showing me the correct weight and time stamp every second or so, so I know DaqFactory can read the RS232 data out of the scale. The output from the scale is a string of " + x.xx lbs\013\010". I am obviously most interested in the "x.xx" as numerical data, but can postprocess that later if I can capture the string. My question is how do I get that RS232 serial data into a variable/ data point I can look at in a graph or output to a data file? Does this require programming / sequences? I have so far had great success with DaqFactory, but have not been able to make the leap between the windows based drop down options and programing sequences. If I want to either: 1) set the scale to only output when prompted, then using DaqFactory ask the scale every 30 seconds for the current weight and display it in DaqFactory and save it to a file or 2) set the scale to output data continuously but wait 30 seconds for DaqFactory to display and record the data point Does this require a programming Sequence or can it be done in some other way? I only ask because I (newbie!) have so far had no luck getting any sequence to work. If I create a sequence called x7 that consists only of "x=7" and then in the command window I type "?x" I always get a C1000 error. No combination of file save, apply, apply & compile, run sequence, etc seems to get DaqFactory to know I want X to be equal to 7 so obviously I am not even slightly good at sequences. Thanks!