arjun

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About arjun

  • Rank
    Newbie
  1. You are correct, Sec. 9.2.3.of the DF_Labjack User Guide does indeed refer to this. Your prompt help is much appreciated, and is one of the primary positive reasons for using Labjacks and DF! Arjun
  2. Hi, I'm trying to understand how to get the MSW for two quadrature channels streamed into a U6. I have done this for a single quadrature encoder and there are no issues. Two quadrature inputs need 4 timers to be used, so I've set up four Timers 0 thru 3 in Mode 8 ( quadrature). So far so good. The LSW of the quadrature count is then read from the special stream channels 200 (Timer0) and 202 (Timer2) . I have created channels with a timing of 0 in the DF channel table. The confusion begins when one needs to read the MSW of Timer0 and Timer2 The MSW is available in the special Channel No 224 ( TC_Capture), which has to be read after the LSW. So, for a single quadrature counter, the stream channel list would be (200,224), and data from these "registers" would be stuffed ino the DF channels with the corresponding channel nos. The channel table then looks like this:( and works if you want to stream a sigle quadrature encoder) Name Device Device Number I/O Type Channel Timing ChA1 LabJack 0 A to D 200 0 ChA2 LabJack 0 A to D 224 0 One then can obtaine signed 32bit 2's complement using the data from ChA1 and ChA2. However, when we need to stream two quadrature encoders, the stream list would be (200,224,202,224) and set by these statements: AddRequest(ID, LJ_ioADD_STREAM_CHANNEL, 200, 0, 0, 0) AddRequest(ID, LJ_ioADD_STREAM_CHANNEL, 224, 0, 0, 0) AddRequest(ID, LJ_ioADD_STREAM_CHANNEL, 202, 0, 0, 0) AddRequest(ID, LJ_ioADD_STREAM_CHANNEL, 224, 0, 0, 0) How then do I read ( and distinguish between ) the MSW corresponsing to Timer0 and Timer2? What DF "Channel" do I assign to the TC_Capture of Timer2? Any help will be much appreciated! Regards Arjun
  3. I'd appreciate some help/clarification with the 'FindExpr' function. FindExpr("123", "\d") evaluates to {0, 1}, which is as expected. However, FindExpr("123", "\d+") also evaluates to {0, 1} which is not as expected. I would expect that the second expression evaluates to {0, 3}. Given the above behavior, how can I find the starting index and length of the longest possible number in a string? For example, if the string was "hello123world" the index and length of the longest possible number in the string are 5 and 3 respectively. Thanks.
  4. Can anyone point me to examples of DF sequence scripts that send commands and retreive data from the LabJack U12? There is plenty of stuff about for ways to script for the LJ-UD driver, but I cant seem to find the equivalent for the U12. Any help would be appreciated. Arjun