Jump to content

kushal.nargundkar

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by kushal.nargundkar

  1. Hi John, I didn't see your response until now. So the root cause was that the same class was used for both left & right sides. Hence the same memory handle was assigned to both objects. This would be an issue when trying to read AI synchronously at the same time. I created 2 different classes even though identical to each other & then using the serial number of the MCC boards to use separate class solved the issue.
  2. Hello John, They are the same devices and need to be used independently. I don't want to sync them. All the functions when used with Board number as 0 work & they're happy. The moment they get 1 as a board number they don't work. I get invalid board number error. Is this a known issue? I'm using InstaCal to recognize both devices & have hard coded the objects to use those board numbers. I'm also looking for the Serial number to identify them in my code.
  3. Hello, I wanted to know if it is possible to use 2 different MCC boards in a single application? I have 2 channels connected on AIN0 on 2 separate boards & I'm creating 2 different instances of DAQBoard using createDAQDevice & calling them Board #0 & Board #1 and it is giving me a Dialog box of "Board number already in use" Do you have any sample code of such an application?
  4. Hello John, I'm trying to get dual channel system working with 2 USB 1608 connected to my PC. When I try to start the DAQ, I get error message saying "Invalid Board Number". I'm using 0 & 1 as the 2 boards. I can see in InstaCal both boards are connected & working properly with correct board numbers. When I have only 1 connected of either devices, it works as expected but when I connect both, I get that message. What am I doing wrong? Do you have any sample code that I can test with more than 1 board connected?
  5. I was able to get it working after I used your code. The data needed to be UShort when passing to the function call. I had it as Double so the overloaded function wasn't working.. Thank you for your help. I appreciate it!
  6. Thank you John, I used your code & wired the High(1) to AGND(3) & left the LOW(2) as it was. I saw that the values were still 0. When I reverted back & made a small change in the code I was able to see the count values. I only have AIN1 connected, rest are unconnected. I think I can use that but don't know why when connected to ground it still reads 0.
  7. And yes my code uses WinBufAllocEx, WinBufToArray and scan options do not include ScaledData. Would there be a difference of input signals for the 2 functions? Like if my signal in whichever mode whether differential or single ended works for Scaled, would it not work for WinBuf? When you say valid signals, how do you define what is valid?
  8. I currently have only 1 channel on which I've connected my 5Vpp signal. When i use ScaledWinBuf function, I get data which is in volts but the exact same code when i replace it with only the WinBuf function & changing the ADDataV to be Double(,) instead of Double() it gives me all 0's. Do you have a minute to do a remote session to look at my code live so that i can show you what is going on?
  9. When I switch to WinBufToArray, my rawdata array is all zeros. Hence I had to switch to ScaledWinBuf. But my rest of the code expects it to be A/D counts. What should I keep in mind to make WinBuf to work? I am changing the ScaledWinBufAllocEx to WinBufAllocEx. I noticed that it Winbuf outputs a 2D array where as Scaled outputs a 1D array.
  10. Hello John, What is the difference between the ScaledWinbuftoArray & WinBuftoArray? Previous code was using WinBuf & now I'm using Scaled version. My actual sinusoidal signal is 5Vpp & my raw data coming in from Windows buffer fluctuates between [-2.5,2.5]. If the USB-1608GX is a 16-bit DAQ device, I'd have expected the raw data to be 5/65536 or 5/2^16 & then I'd have to scale it to real world values. Does it not work that way?
  11. Can you send your code to me & also the results which show the buffer values? Attached is my code.MCCAnalog17.vbwhere I'm hard coding the numpoints to 25000. The AINumpoints becomes 50000. I want to understand why I'm limited to these values. I want to go much higher
  12. Hello John. I have a follow up question on this. It seems like there is a limitation to the size of the buffer that I'm acquiring the data. It is set to around 25000. Is there a way around this? Can I change to something much higher from somewhere? Numpoints at 25000 makes the midscanpoint to 12500 & anything higher than that doesnt work.
  13. Thank you for your response. In the original code it was set to ScanOptions.Background Or ScanOptions.Continuous Or scanOptions. That also didn't work. So I looked at the sample code & tried plus. I'll check the buffer size.
  14. Ok. I used another solution file which you gave before & that worked. Now when I am trying to read the values from the buffer, my raw data is remaining zeros but I dont have any errors. Attached is my file. What am I doing wrong? MCCAnalog.vb
  15. Hello I'm trying to use the sample code in the UL Examples for Analog Input scanning named "DaqInScan03.NET" but I'm getting an error "Invalid Digital Port Number". I'm running Windows 11 64 bit & I had to do a 1-way upgrade to open the solution file. Is there a difference between the 32-bit driver & 64- bit driver? We used to use MCC almost a decade ago & I have a solution file which is using 'MCCAnalog' class but my suspicion is it was written for the 32-bit driver & I'm using a 64-bit driver. The existing class is also giving me the same error when I'm using breakpoints to see the ulstat value
  16. Hello JRys, I was going through the sample code you provided & had a few questions. Why do we have to ping pong between lower & upper half to capture the buffer data? I changed the channel count to 8 & highchan to 4 since I have 8 channel AI board. When I did that & connected an external analog source to AI1, I saw all the other channels were also getting updated. My source was a sine wave of 5Vpp. I'd thought only AI1 would get updated. Does it scan all the channels & then outputs only the one that's changing? In my ABS application, I'd have 2 AI channels- one for left channel & 1 for right. So, I'd need the data buffer to hold them separately as e.g. AI0 & AI1 & not mix them up. Attached is a screenshot of the fault that I got when I incorporated into my VB solution file. Also attached is the NI Analog class I'm trying to replace with MCC Analog MCCAnalog.vb
  17. You're awesome! That's exactly what I needed. I didn't have my device connected, so it said "No device connected". When I plugged it in & started the application, it read SN, PN & constant sampling of the 4 AI channels. Thank you so much! I'll reach out to you if I need anything else.
  18. Hello all. I'm new to MCC & their USB device USB-1608GX for analog input measurement. We used to use NI USB6212 device & so have VB code written for sampling the data. I need to replace it with MCC drivers. How do I go about doing that? What changes would I have to make in order to make it happen? I'm using Windows 10 as OS & VB.NET framework. I have download InstaCal and can see my device when I plug it in. Also I have downloaded UL & have been going through the examples. I am relatively new to VB as well. So ideally a sample solution file which is specifically for reading analog input values would be ideal. Thanks in advance
×
×
  • Create New...