Search the Community

Showing results for tags 'array'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • DAQFactory
    • Alarming
    • Channels, Conversions and general data acquisition
    • Graphing
    • Logging
    • Modbus
    • Networking: web, email, FTP etc.
    • PID
    • Screen Components and User Interface
    • Sequences and scripting
    • Serial Communications
    • General DAQFactory
    • DAQFactory and the LabJack
    • DAQFactory Express
    • DAQConnect
    • DAQFactory New Feature Requests
    • The DAQFactory Guru's Articles
    • DAQFactory Newletters

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 9 results

  1. I was working with some point arrays (for drawing functions) and came across this puzzle with Flatten. It seems that I get different results depending upon how the source array has been previously manipulated (e.g. applying constants vs variables). The code is very short and outputs to the console window. It is particularly visible if the offsets chosen are negative. Could I be making some error with array allocation, etc.? v5.91 / 2203 TestFlatten.ctl
  2. I came across a cool feature with the undocumented OOP scripting that I may have missed among the forum docs. I created a class to group several related member variables. Then, I built an array of these objects. As expected, I can access a member variable for an object in the array using g_arrayOfClass[nArrayIndex].member. However, I was not aware that I could use g_arrayOfClass.member to return an array of the member (one for each object in the object array)! This is extremely useful for gathering an array of elements in the object list for filtering, etc. (Currently, my script loops over the object list to check members or builds an array manually when needed.) I know OOP is officially unsupported, but I am curious if this 'feature' is by design...I don't want to code myself to far into unsupported territory than necessary. Thanks for your insight.
  3. I need to align (by time) two data series in a table. This is no problem when both series contain at least 2 data points. However, if one series contains only one data point, I cannot find a solution to it. Example: ch1={1,2} (with timestamps associated) ch2={10} (with same timestamp as ch1[0]) What I need is the following table (the hyphens may be replaced by anything showing that there is no data): ch1 | ch2 ========= 1 | 10 2 | - What I actually get with align(ch2, ch1, 1) is this: ch1 | ch2 ========= 1 | 10 2 | 10 As soon as ch2 gets more than 1 element, I get the result I expect. I believe that the problem is related to the fact that 1-element arrays are not treated as arrays, so ch2 actually is not {10} but just 10. Is there a solution to this problem?
  4. which array should i use to perform channel output as array and how to recall the array?? example: channel is MyOut should i use: Rand (MyOut) or Fill(MyOut,10)
  5. I have 2 channels: - A with a gas concentration, read from a LabJack every 5 seconds. - B with a flow rate, getting a new data point each time 20 ml have passed the flow meter, which can be more than an hour. What I want to do is displaying both the raw gas flow (channel B ) and the flow of my gas (i.e. channel A multiplied with channel B ). However, if I just do "A*B", then the program will multiply the channels as arrays, without taking care of the different time scales. Is there a more elegant way to do this than by creating a help channel which is filled with "A[0]*B[0]" every time a new data point is recorded in B?
  6. I am trouble with functions such as Min(), Max(), and Sum(). I have a variable that stores an array of channels. I then have three other channels that store the min, max and sum of these channels (the most recent element of each). Here is my code: CVArray = {Battery1Voltage[0], Battery2Voltage[0], Battery3Voltage[0], Battery4Voltage[0]} scBatteryVoltage.AddValue(Sum(CVArray)) scBatteryMinCellVoltage.AddValue(Min(CVArray)) scBatteryMaxCellVoltage.AddValue(Max(CVArray)) When I look at these channels, a 0 gets added. Can you not pass a variable into these functions? Thanks...
  7. DAQUSERatNDCPower

    computing a simple checksum

    I am trying to communicate with an electronic load. The protocol is very simple and requires a 26-byte set. The 26th byte is a checksum that adds the previous 25 bytes, but only keeps the two least sig figs. For example, if the sum of the 25 bytes is 0x3af, the checksum would be 0xaf. I am having trouble efficiently computing this sum. Right now I just have the 26 bytes as 26 different local variables. I then have the following line of code: Byte26 = Sum({Byte01, Byte02, Byte03, Byte04, Byte05, Byte06, ... Byte23, Byte24, Byte26}) Byte26 = Byte26 & 0xFF //I do this to get the byte back down to 8 bits It is throwing a C1072 error for the first line. I looked this error up and it says I am missing a bracket. Am I going about this incorrectly? Thanks for your help... Marshall
  8. I want to find the best-fit slope from an array depicting S-curve. I want to truncate away my array that is 60%max and min at both ends. Filter(Array, Criteria Array) seems to address this solution. How would Criteria Array be setup?
  9. I don't understand how to use the array function of the checkbox, and I wasn't able to find anything informative on the forums. I presume its usefulness comes from being able to assign an array to the "Set Channel" box, and each checkbox would correspond to a space in the array. Regards, Brian