1/9/2024 0 Comments Igor pro forum![]() Will be concatenatedįor( i=0 idataWave // This is the length of one chunk Make /O/D/N=(numReads) commBackLogWave=9999, UDBackLogWave=999, SampRead=0 Two for the data and two for backlogs and one for samples read: Printf "Actual Total Sampling Rate = %.3f\r", NrCh*value ![]() Printf "Actual Sampling Rate per channel = %.3f\r", value The actual scan rate is returned in the value parameter The actual scan rate is dependent on how the desired scan rate divides into Variable LJE_MIN_GROUP_ERROR = LJ_StringToConstant("LJE_MIN_GROUP_ERROR")Įrr = LJ_GetFirstResult(LJref, ioType, channel, value, x1, userData)Įrr = LJ_GetNextResult(LJref, ioType, channel, value, x1, userData)Įrr = LJ_eGet(LJref, LJ_ioSTART_STREAM, 0, 0, value) Variable LJE_NO_MORE_DATA_AVAILABLE = LJ_StringToConstant("LJE_NO_MORE_DATA_AVAILABLE") Variable ioType=0,channel=0,value=0,x1=0,userData=0 Get all the results just to check for errors. Setting the range of the streaming channel (+/- 10 V)Įrr = LJ_AddRequest(LJref, LJ_ioPUT_AIN_RANGE, str2num(ch), LJ_rgBIP10V, 0, 0)Įrr = LJ_AddRequest(LJref, LJ_ioADD_STREAM_CHANNEL, str2num(ch), 0, 0, 0) //Single ended ![]() Setting the resolution of the streaming channelĮrr = LJ_AddRequest(LJref, LJ_ioPUT_CONFIG, LJ_chAIN_RESOLUTION, 0, 0, 0) Clear any configuration of streaming channels that might be present:Įrr = LJ_AddRequest(LJref, LJ_ioCLEAR_STREAM_CHANNELS, 0, 0, 0, 0)įor(i=0 i ![]() String channels //String or stringlist with channels (Use AIN and FIO, e.g. If someone has some insight in this, here is my code: I can't figure out what I'm doing wrong, but I have the feeling it goes wrong somewhere with the requested number of scans from the Labjack. Igor keeps crashing when I try to stream more than one channel. Unfortunately I have encountered some serious hiccups in the code that I can't seem to sort out. I can probably get around to that sometime this week. We could also look into updating the XOR on our site and add the functionality that supports reading arrays for streaming. Though typically with command-response mode speeds, using the language's timing (mentioned in previous paragraph) is adequate and less complicated. You could configure the LabJack timers for the system timer ( mode 10 and mode 11), and group your analog/digital readings with the timer reads that has the U3 time. I'm going off documentation for this information. There is the ticks method with 1/60 of a second precision, and StartMSTimer() and StopMSTimer() which has a microsecond timer. Regarding Igor Pro, there are some "Timing" methods. Stream mode is for 100 to 50k scans/second rates. Command-response mode is typically used for scan rates of 100 scans/second or lower, but depending on analog input configuration, system performance and language can work up to 1000 scans/second. You could use command-response mode (standard communications) to get readings and use the Igor Pro timing immediately after the reading for a timestamp. Take a look at the examples here, which include a stream example:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |