-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NI DAQ Terminal error - Rattlesnake version 3.0 #5
Comments
Hi Luka, Thanks for the bug report, and thanks for doing some debugging. I know it's not trivial to try to figure out what's going on in a big, convoluted codebase like Rattlesnake. These two lines of code were added to fix a bug in the previous version where the trigger to synchronize the output and acquisition tasks were not actually applied. Basically, the trigger was "set up" but never "applied" to the data acquisition output task. In that case, the output would start, then the acquisition would start afterwards, but there was no synchronization between the two, so there could be some undetermined amount of time between the acquisition and output starting up. This is typically not a huge deal, because with standard operations, this delay should be relatively small (probably a few samples), and with Rattlesnake measuring the output directly, there is no concern that the data is out of sync as measured. More reading into how NI does it's triggering led me to add those two lines. With those two lines added the output task starts up, but does not start outputting until the trigger occurs, which occurs when the acquisition starts up. In my mind, that would allow output and acquisition to be better synchronized (there is still a small delay, though it's usually less than a sample). Anyways, it looks like the bug that you are seeing is a result of the cDAQ chassis not actually having a trigger pathway between the acquisition and output cards that you are using. This was an oversight on my part. We primarily use PXI chassis, which do generally have a dedicated trigger lines (though it can get funky when daisy chaining multiple chassis together), and I haven't had the opportunity to do a lot of testing on other NI devices. I had assumed that any NI-DAQmx device would have the same triggering capabilities, so it is hard-coded into the NI interface, as you saw. Commenting out those lines then removed the application of the trigger. Ideally, there should be some kind of check to determine what trigger lines are available in a given hardware device. Looking through the NI-DAQmx documentation, I'm not seeing anything that immediately jumps out at me as a way to determine what the available terminals are. Perhaps the If you want to do some more debugging, you could try changing the To summarize:
|
I just pushed a fix for the software which should now support cDAQ devices without needing to modify the code. In the updated user's manual, the example problem in the appendices uses a cDAQ device. Could you by chance try it out for me to see if it works for you. |
Bug description
I have encountered a bug in the newest version (3.0) of Rattlesnake Vibration Controller Package. The error occurs in all environments and it has to do something with the NI device terminals. For example, when I go to Time Signal Generation Environment everything works fine, until I press the Arm Data Acqusition button. That is when I get the following error:
The same error occurs when trying to do system identification in MIMO Transient Environment or MIMO Random Vibration Environment.
To Reproduce
Steps to reproduce the behavior:
channel_table.xlsx
Possible Fixes
I then downloaded source code for the previous version of Rattlesnake (2.0) and tried the same thing and it worked. Then I did some source code comparison between the versions, specifically the
nidaqmx_hardware_multitask.py
file inside thecomponents
folder. I noticed that the file in the newer (3.0) version is the same as th file in the older (2.0) version, with exception of 2 new lines added in the newer (3.0) version of Rattlesnake. Those two lines are:task.triggers.start_trigger.dig_edge_edge = ni.constants.Edge.RISING
task.triggers.start_trigger.trig_type = ni.constants.TriggerType.DIGITAL_EDGE
After commenting out those two lines in the newer version, the error is gone and the program works as expected.
My question is, what does these two lines of code do and why were they added in the newer version?
Thanks,
Luka
Desktop:
The text was updated successfully, but these errors were encountered: