Closed barcusmehling closed 9 months ago
LAN-XI communicates with the software via JSON, so the fact that the JSON object seems to be empty (no character at line 1 column 1) suggests to me that the communication isn't occurring correctly with the LAN-XI module. It looks like the error is in the internal JSON library rather than in any Rattlesnake code. I haven't seen this particular error before, but my thought is that it might be occurring if you don't have the OpenAPI enabled on the card(s)? This might be as simple as updating the firmware for the card to enable the OpenAPI, as it was made free for everyone with one of the more recent firmware updates. With old firmware it may still be locked behind a license requirement.
As a quick check to see if the problem is on the software end or the hardware end, you could try to see if you can get the examples from HBK to work on your device: https://github.com/hbk-world/open-api-tutorials. If they work, then the error is likely on the Rattlesnake end, and if they don't, then it's more likely a configuration issue with your hardware. It looks like they have a GIF of an example communication through the command line that should be easy enough to try out if you have Python installed, just to see if the communication is working (https://raw.githubusercontent.com/hbk-world/open-api-tutorials/master/images/open-api-console.gif).
Let me know what you find from this investigation step. I have to admit that this was my first project that really used HTTP/network communications, so the LAN-XI implementation is likely pretty fragile.
Just saw the attached channel table and I think that might be the issue. The output channels are not correctly filled out. Basically, to get around triggering and synchronization issues in various systems, you need to tee off the output signal into one of the acquisition signals. Take a look at the user's manual https://github.com/sandialabs/rattlesnake-vibration-controller/releases/download/v2.0/Users_Manual.pdf chapter 5 for more information. There are a couple issues I see in the attached spreadsheet.
Your "Output Feedback" rows do not have anything else in them. This might be the issue you are seeing with that JSON error, why it is giving back an empty object. It also looks like you have the same IP address for the output cards as the response cards. I don't know the full line of LAN-XI hardware, but I don't recall seeing that they have a 24-input/6-output card (if they do please let me know the model number so I can look into that exact card, we typically only use the type 3050 and 3160s in our lab, so that's all I've been able to verify). For each hardware card in your test, you will need the IP address of that card and the physical channel will be the channel number on that card. I've attached an example to look at.
This is a test containing 8 LAN-XI cards. Note that each of the 8 cards has a different IP address that the software uses to communicate with each card. 7 of the cards are the 6 input cards (Type 3050) and the last is the 4-input/2-output (Type 3160) card. Note that I have sources 2 and 1 on card 8 teed off to acquisition channels 3 and 4 on the same card (same IP address), respectively. The output and acquisition of these source channels are listed in the same row. Note also that even though I have more than 6 channels, the physical channel number is never larger than 6, because that is the largest number of channels on the card (Figure 5-1 in the manual might help you visualize this).
One other thing I see is the Excitation Source column, which for LAN-XI should be "CCLD" or left blank.
If you are still having trouble, could you get me a more complete layout of your acquisition hardware? I could be more help setting up the channel table if I knew exactly what you are trying to communicate with.
The DAQ is a dataphysics abacus. I included some pictures of it - it looks like it has 6 LAN-XI cards which have four inputs and one output. If this is the case, do you know how I could find the IP address of each card? We might have it documented somewhere but I'm not sure - the manual we have for it doesn't give too many details. Also I attached an updated version of my channel table that should be accurate except for the IP addresses.
I haven't checked the OpenAPI firmware yet as I'm guessing the channel table is the bigger problem, but I will check it if I get the table right and it still doesn't work.
Let me know if I can provide any other information that could help
Hmmm, I'm not familiar with that data acquisition setup, so I'm not sure I can be more help. On our LAN-XI modules, it shows the IP address right in the little screen at the top. You can kind of see it in this picture from their website. https://www.bksv.com/-/media/Images/Products/Data-acquisition-hardware/lan-xi-modules/3050/3050-A-040with2100-040.ashx?w=1600&hash=2FCF0D1C0067F5A2C3EA8AA429F7A752736D5329. You might want to verify with HBK that those cards can be accessed using the OpenAPI.
I wonder if you could do some kind of network scan to see the different IP addresses of devices on your network to try to figure out which is the right one?
Also, I think there are still some issues with your channel table. It looks like you have the voltage for each shaker teed into the 4th channel on each card, so I modified your channel table so it is set up like that, where the feedback device output channel 1 is in the same row as the acquisition device channel 4. The attached spreadsheet should be correct if you can get the IPs figured out. 24channel_setup_new_2_corrected.xlsx
Just an FYI, it looks like you are using a data physics data acquisition system, which is currently not supported by Rattlesnake. We recently got Rattlesnake working with the small Data Physics Quattro device, and plan to implement the DP900 series when they release a programming interface for it, hopefully this year.
I don't think this is a bug in the code so much as I am probably doing something wrong but I can't figure out what this error means or why I am getting it, so any help is greatly appreciated.
Channel Table: 24channel_setup_new.xlsx
Error Log: Rattlesnake.log
Describe the bug After loading in the channel table, selecting LAN-XI, and clicking "Initialize Data Acquisition", I get the following error: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This seems to indicate that I am missing the first value in the channel table, but it is filled out, so I must be misinterpreting it.
To Reproduce Steps to reproduce the behavior:
Expected behavior An error window should pop up with the contents shown in the attached log.
Screenshots and Log Files See attached log
Desktop (please complete the following information):
Thanks!