ehaber64 / Cicero-Word-Generator-UR_CAT-compiled

This repository only contains a zip file with the most recently compiled version of the Bigelow CAT group's Cicero Word Generator software. Please see the Overview of Changes to the Cicero Word Generator document for a description of the edits that have been made to this version. The uncompiled software is available at
https://github.com/ehaber64/Cicero-Word-Generator-1
1 stars 1 forks source link

Failed buffer generation due to exception: Specified operation cannot be performed when there are no devices in the task. Task Name: _unnamedTask<3> Status Code: -200477 #2

Open TonyYang2020 opened 4 years ago

TonyYang2020 commented 4 years ago

I am totally new to C#. So I am concerned that I missed something import or did something terribly wrong. Here is what I did.

  1. Open the 'WordGenerator.sln' with Visual studio 2019
  2. Replace four dll documents in Atticus with those in Cicero-Word-Generator-1.64rev7\Atticus\x64 (akeshet' version)
  3. Build Atticus & Cicero
  4. The two softwares can be opened.
  5. In Atticus Server, all the hardware can be found. But the 'DIsconnect' button didn't work. The event log shows"AtticusServer.AtticusServerCommunicator: Server disconnected is not currently implemented. You can achieve this functionality by restarting the server."
  6. In Cicero, after conneting to the server via localhost, all the hardware channels could be found in ChannelManager.
  7. With a analog device assigned to a AO channel, the ‘Run Iteration’ gives the error 'Unable to generate buffers. Failed_On_Server'

I have no idea what's going on. If you can help us to figure it out, we will appreciate it a lot. capture2 capture1

ehaber64 commented 4 years ago

Hey there,

I'm so sorry for the confusion! I uploaded the incorrect zip file here, and that is why you're having trouble getting Cicero and Atticus to work. The repository you used, Cicero-Word-Generator-UR_CAT-compiled, should contain already compiled versions of Cicero and Atticus, so you shouldn't have to do any coding whatsoever to use them.

I fixed the zip file that is currently stored on the repository, so if you download it again, it should now work. It contains two folders (among others), one named Cicero, and one Atticus. Both contain already compiled applications that should allow you to use Cicero and Atticus.

I'm very sorry again for causing you trouble, and I hope that you are able to use the new file without any problems. Please let me know if these cause you any more trouble!

TonyYang2020 commented 4 years ago

Thanks for your generous help!

The compiled software works pretty well. But the same problem shows up again. This time I try diffenert configurations. 1)1 Analog device unassigned error:Failed buffer generation due to exception: Specified operation cannot be performed when there are no devices in the task. Task Name: _unnamedTask Status Code: -200477 2)1 Digital device unassigned error:Failed buffer generation due to exception: Specified operation cannot be performed when there are no devices in the task. Task Name: _unnamedTask Status Code: -200477 3)1 Digital device assigned to Bob/Dev1/port0/line0 error: Failed buffer generation due to exception: Selected lines do not support buffered operations. Ensure only lines that support buffered operations are being used in the task. If using change detection, the task must be changed to non-buffered hardware timed single point to support these lines. Device: Dev1 Physical Channel: port1/line0 Task Name: Dev1 output task Status Code: -201062

port1/line0 is quite wired... 4)1 Analog device assigned to Bob/Dev1/port0/ao0 error:Failed buffer generation due to exception: Specified operation cannot be performed when there are no devices in the task. Task Name: _unnamedTask Status Code: -200477

I'm sure what goes wrong. I have visual studio 2010, measurement studio 2010 for VS 2010 and DAQmx 9.3 installed in the computer. Maybe I just configure the hardware in Atticus in the wrong way?

TonyYang2020 commented 4 years ago

One of my colleagues told me that the Multifunction I/O Devices (PCIe 6363 in our lab) don't work in this software. Is that a problem?

TonyYang2020 commented 4 years ago

Same -200477 error on a PXIe 6738 card.

ehaber64 commented 4 years ago

Sorry for the long delay between responses! In our lab we use a PXI-1042Q chassis to communicate with our NI output cards and devices, so I apologize but I don't have any experience using the PCIe 6363 or PXIe 6738 cards.

So the best I can do is try to help you debug it, but your colleague may be correct and this software may not properly interface with your hardware. And I'm very sorry in advance if my attempts to help you end up being completely ineffectual.

Does your hardware show up correctly in Atticus? And if so, does the information in Atticus match what you see if you use NI MAX? If both are true, could you send me the hardware settings of the analog channel you're trying to output to? Namely, the upper-center box of Atticus with the fields Analog, Analog In, Digital, etc.

Thanks so much! And sorry again for all of the trouble, I hope we can get this resolved soon!

TonyYang2020 commented 4 years ago

I am so sorry for taking your time again. We really appreciate your generous help!

  1. The hardware PCIe6363 shows up correctly with 48 digital channels in Atticus. Here is the 6363 manual https://www.ni.com/pdf/manuals/377777a.pdf
  2. The hardware settings are showed below. Analog AnalogChannelsEnabled: False AnalogDataTransferCondition: AnalogDataTransferMechanism: UseCustomAnalogTransferSettings: False Analog In AnalogInEnabled: False Digital DigitalChannelsEnabled: True DigitalDataTransferCondition: DigitalDataTransferMechanism: Use32BItDigitalPorts: False UseCustomDigitalTramsfersettings: False Error Checking SamplesGeneratedCheckSensitivity: Strict FPGA RetriggerDebounceSamples: 0 Global DeviceConnected: True DeviceDescription: PCIe-6363 DeviceEnabled: True DeviceName: Dev1 IsFPGADevice: False RFSG AutoEnable: False AutoInitate: False RefClockSource: Serial SerialSettings: Timing ClockEdge: Rising MasterTimebaseSource: MySampleClockSource: DerivedFromMaster SampleClockExternal: SampleClockRate: 10000 UsingVariableTimebase: False Triggering SoftTriggerLast: False StartTriggerType: SoftwareTrigger TriggerInPort:

Could you please share with us your NI cards‘s model number and their settings? We have one another computer with a PXIe 1071 chassis with PXIe 6363 & PXIe 6738. Maybe be the same settings as yours work on that computer.

Thanks again for your help!

ehaber64 commented 4 years ago

I'm very happy to try and help get your setup up and running, no need to apologize!

So there are two changes I would make to the Atticus hardware settings you sent me. I don't know if this will fix the errors you're having, as our lab is currently closed down and so I can't test using our setup. Nevertheless, these will at least fix problems you may have come up against later on!

Since you're using this device as the master timing source, you'll want to set

MasterTimebaseSource: OnBoardClock

ehaber64 commented 4 years ago

Sorry, I didn't mean to close the issue, sorry about that!

Moving on, you might also want to set

SoftTriggerLast: True

Finally, I would suggest changing

SamplesGeneratedCheckSensitivity: Within4

To avoid small differences in the number of buffers being generated from being labeled as errors, although this most definitely is not causing your current problem. If you make those changes, then the hardware settings will be the same as the settings we use on our PXI-6533 and 6534. If that doesn't rectify the problem, we could also take a look at your Atticus server settings and see if there's anything obviously out of place there.

TonyYang2020 commented 4 years ago

Thank you again for your advice. I changed the settings as you posted. But the error shows: Failed buffer generation due to exception: Specified property is not supported by the device or is not applicable to the task. Property: NationalInstruments.DAQmx.Timing.MasterTimebaseSource Task Name: Dev1 output task Status Code: -200452

Maybe the Atticus didn't create the task correctly? If that's true, everything makes sense.

Is it necessary to test it on a blank win7 computer without any NI software or drivers? Just the compiled software. I am concerning the wrong drivers are installed.

ehaber64 commented 4 years ago

It is interesting that Atticus couldn't use PCIe6363 as the master clock, I've never seen that error before. I think that's a great idea, make sure that the new computer has the most recent NI driver libraries as described in the Cicero user manual, since those are the libraries that were on the computer that we compiled Cicero on.

TonyYang2020 commented 4 years ago

We have a little bit progess. With visual studio 2008, Measurement Studio 2010 for Visual studio 2008 and DAQmx 9.3 installed, one dll file shows up with the same version as the software suggested(NationalInstruments.DAQmx, 9.3.35.219). But only NationalInstruments.Common 9.0.35.362 is found in C:\Program Files (x86)\National Instruments\MeasurementStudioVS2008\DotNET\Assemblies\Current. Do you have any idea to get the 9.1.35.159 version? Could you share with us the versions of VISA and 488.2 drivers you guys installed? It may help a lot. Thank you so much for your generous help.

TonyYang2020 commented 4 years ago

I think we found what the problem is. The Atticus and Cicero can work correctly with only AO channels enabled on PCIe 6363 and PCIe 6321. But the digital channels are still not working properly even with the unused channels excluded. The problem might be that PCIe 6363 &PCIe 6321 are all Multifunction I/O Device with different kinds of digital channels(6363: Port0 Line 0-31, support buffered operations; Port1 Line0-7; Port2 Line 0-7). The Atticus might configure all of the channels(including port1, port2) even if they are excluded in Atticus. We are planning to buy a PXIe 6535 card and test it with PXIe 6738. Any advice on analog and digital cards? We truly appreciate your help.

ehaber64 commented 4 years ago

I'm glad to hear that you all are making progress! From your second message this may no longer be relevant but just in case, I believe NI-488.2 17.6 and NI-VISA 18.0 (judging by the release dates) are what we would have compiled Cicero and Atticus against. If this problem with the version numbers pops up again, and you can't find the correct dll files online, then I would be happy to walk you through how to change which versions Atticus looks for at compile time in Visual Studio, so that you can use your current libraries instead of having to find new ones.

Regarding your second comment, we have yet to use anything in the PXIe series, so I'm not sure that I could give any helpful advice on choosing cards, but the cards we've used in our lab are the PXI-6723, PXI-6533, PXI-6221, PXI-6534, and PXI-6713. So I would think that any PXIe cards that are more or less analogous to those cards should work fine.

You are correct that Atticus identifies all of the channels on each card, the only thing that happens when you exclude a channel is that, after it detects it, it won't add it to the list of hardware channels. If querying the channels is causing the error, then you are absolutely right that excluding the channel won't prevent the issue from occurring. It would be very concerning to me if the different types of digital channels on the 6363 and 6321 cause Atticus to fail just by detecting them, so please let me know if you find that ends up being the root problem, because I would be interested in then fixing such a shortcoming of the code.

I'm always happy to help, and I hope you all continue to make progress!

TonyYang2020 commented 4 years ago

This time we run a simple test with PCIe 6363.

  1. Exclude all the port1&port2 lines(don't support buffered operations),
  2. Save the hardware settings as default,
  3. Reopen the Attuicus. Only port0 lines show up,
  4. Configure a digial channel assigned to port0 line 0 in Cicero & run a sequence
  5. The -200452 errors shows up again.
  6. With the digital channel unassigned, no error.

I didn't go through all the codes. But I believe the Atticus might talk to all the lines for buffer generation rather than the port0 lines that we configured. This PCIe 6363 card can work correctly with our labview programs. In these labview programs, only the port 0 lines are configured to run tasks.

ehaber64 commented 4 years ago

It's true that there are parts of the Atticus code that communicate with each channel before checking whether that channel is excluded, so it is possible that in one of these sections it queries the PCIe 6363 card for a property that channel doesn't have and the 200452 error is thrown.

You mentioned that this error is only thrown when the digital channels are enabled, which narrows down the parts of the code that could be throwing this error. I will try and find the part of the Atticus code that is causing this to happen this weekend. Apologies again for all of this trouble, and please let me know if the PXIe cards work or if you learn anything more!