Giter Site home page Giter Site logo

akeshet / cicero-word-generator Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 38.0 96.09 MB

Cicero Word Generator is a user interface and control software suite designed with atomic physics experiments in mind. It can be used to design and run sequences on National Instruments digital and analog output cards. If you would like to use this software without compiling it yourself, please click on the Downloads link below, and download the appropriate version .zip file which includes compiled executibles. Please read ReleaseNotes.txt in the top level of this zip file when upgrading versions for any necessary user-migration actions.

Home Page: https://akeshet.github.io/Cicero-Word-Generator/

C# 82.99% Verilog 1.80% VHDL 1.03% Tcl 0.34% MATLAB 2.07% Python 1.47% C++ 9.66% HTML 0.63%

cicero-word-generator's People

Contributors

akeshet avatar insommer avatar t1mur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cicero-word-generator's Issues

RFSG device communication fails with Atticus 1.65 x 64

An RFSG device we added (NI-5650) could never be controlled by atticus. We tried multiple NI RFSG drivers (from 1.8.5 to 16.0) but the problem persisted (see error message below).

Our only workaround was to build atticus in the 32-bit version rather than the 64-bit.

1/15/2019 1:55:13 PM AtticusServer.AtticusServerCommunicator: Failed buffer generation due to exception: Caught exception when attempting to instantiate an rfsg device named RF1. Maybe a device by this name does not exist? Exception message: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at AtticusServer.RfsgTask..ctor(SequenceData sequence, SettingsData settings, Int32 channelID, String rfsgDeviceName, DeviceSettings deviceSettings) in C:\Users\Fermi1\Desktop\CiceroAtticus\Cicero-Word-Generator-devel-1.7\Cicero-Word-Generator-devel-1.7\AtticusServer\ServerRuntime\RfsgTask.cs:line 238

at AtticusServer.AtticusServerCommunicator.generateBuffers(Int32 listIterationNumber) in C:\Users\Fermi1\Desktop\CiceroAtticus\Cicero-Word-Generator-devel-1.7\Cicero-Word-Generator-devel-1.7\AtticusServer\ServerRuntime\AtticusServerCommunicator.cs:line 816

"load file option " while defining an analog channel

In our lab, we are currently using Cicero for an atomic physics experiment and we need help for one point.

When parametrizing an analog group we can define what each analog channel is going to do by defining its waveform ( step/picewise linear/ sinusoidal / etc etc ) but we can also use the option " load from file ".

What kind of file do we need to load ( txt ? ) and which format must be used ? Is there any example in the cicero files I can draw inspiration from ?

Thank you for your help and your time.

Cicero hangs if server is disconnected during run.

If a server is closed during a run, Cicero will hang at the end of the run, waiting for some kind of reply from the server. Eventually it times out and throws an exception (see below), but this happens after maybe 10-20 seconds so a quicker timeout is probably necessary.

9/26/2014 10:30:58 PM Caught exception when attempting to run method on server Snippet Server: Caught an exception when attempting to run method Snippet Server.runSuccess: Exception has been thrown by the target of an invocation. at DataStructures.ServerManager.runMethodOnServer(MethodInfo method, ServerInfo i, Object[] parameters, Int32 msTimeout, EventHandler1 messageLog) in C:\Users\katnip\csharp\Cicero-Word-Generator\DataStructures\Communication\ServerManager\ServerManager.cs:line 461 9/26/2014 10:31:09 PM Caught exception when attempting to run method on server Snippet Server: Caught an exception when attempting to run method Snippet Server.stop: Exception has been thrown by the target of an invocation. at DataStructures.ServerManager.runMethodOnServer(MethodInfo method, ServerInfo i, Object[] parameters, Int32 msTimeout, EventHandler1 messageLog) in C:\Users\katnip\csharp\Cicero-Word-Generator\DataStructures\Communication\ServerManager\ServerManager.cs:line 461

Allow binding of variable values to K groups

This is another feature idea/request. It would be useful to allow variable values to be bound to timestep groups, so that I can change the values of automatically as I shuffle timestep groups. For example, sometimes I do absorption imaging through a beam splitter cube, and sometimes not.

1.61 breaks loading old sequence variables

Some changes to the way variables are created seem to have made 1.61 throw an exception when loading an old sequence. Variables are still present in the sequence explorer, but they are not displayed on the variables tab. The exception is copied below. The sequence loads fine in 1.60.

I finally have VS2010, so if Aviv doesn't get to this, I may try to squash this.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at WordGenerator.Controls.VariableEditor.updateDerivedValue() in C:\Users\Aviv Keshet\Documents\Software\Cicero-Word-Generator\WordGenerator\Controls\VariablesTab\VariableEditor.cs:line 341
   at WordGenerator.Controls.VariablesAndListPage.ved_valueChanged(Object sender, EventArgs e) in C:\Users\Aviv Keshet\Documents\Software\Cicero-Word-Generator\WordGenerator\Controls\VariablesTab\VariablesAndListPage.cs:line 213
   at WordGenerator.Controls.VariableEditor.numericUpDown1_ValueChanged(Object sender, EventArgs e) in C:\Users\Aviv Keshet\Documents\Software\Cicero-Word-Generator\WordGenerator\Controls\VariablesTab\VariableEditor.cs:line 182
   at System.Windows.Forms.NumericUpDown.OnValueChanged(EventArgs e)
   at System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
   at WordGenerator.Controls.VariableEditor.setVariable(Variable var) in C:\Users\Aviv Keshet\Documents\Software\Cicero-Word-Generator\WordGenerator\Controls\VariablesTab\VariableEditor.cs:line 77
   at WordGenerator.Controls.VariablesAndListPage.layoutVariables() in C:\Users\Aviv Keshet\Documents\Software\Cicero-Word-Generator\WordGenerator\Controls\VariablesTab\VariablesAndListPage.cs:line 155
   at WordGenerator.Controls.VariablesAndListPage.layout() in C:\Users\Aviv Keshet\Documents\Software\Cicero-Word-Generator\WordGenerator\Controls\VariablesTab\VariablesAndListPage.cs:line 73
   at WordGenerator.mainClientForm.RefreshSequenceDataToUI(SequenceData sequenceData) in C:\Users\Aviv Keshet\Documents\Software\Cicero-Word-Generator\WordGenerator\Controls\MainClientForm.cs:line 392
   at WordGenerator.mainClientForm.openToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Users\Aviv Keshet\Documents\Software\Cicero-Word-Generator\WordGenerator\Controls\MainClientForm.cs:line 529
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WordGenerator
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Word%20Generator%20Application/Cicero-Word-Generator-1.61/Cicero/WordGenerator.exe
----------------------------------------
DataStructures
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Word%20Generator%20Application/Cicero-Word-Generator-1.61/Cicero/DataStructures.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
dotMath
    Assembly Version: 1.0.4546.29073
    Win32 Version: 1.0.4546.29073
    CodeBase: file:///C:/Word%20Generator%20Application/Cicero-Word-Generator-1.61/Cicero/dotMath.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

FPGA-retrigger: multiple retrigger inputs?

Having more than one retrigger input would make it easier to make sequences that have, say, one Word retriggered on a MOT fluoresence, while another Word is retriggered by the AC line.

Buffer underrun

Hello,

I am a new user of Cicero and I am in trouble with a buffer problem and I can't find the way to fix. I used a NI PXIE 6535 card for digital output and each time I run my sequence, it fails due to buffer underrun.

Please find below the exact error message. Do you have any idea ?

I am using a FPGA as external time reference with exactly the frequency 10MHz which is the upper limit for external clock of my digital card. COuld it be the origin of my problem ?

Thanks for your answer

ERROR MESSAGE :

09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Received settings.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Received sequence.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Stopping and cleaning up old tasks.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Generating buffers.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Creating Variable Timebase Task on fpga device 12360003WE.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: ...Done (10 segments total)
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Generating buffer for Devkiwi
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Buffer for Devkiwi generated. 8004 samples per channel. On board buffer size 4095 samples per channel.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Generating buffer for Devbanane
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Buffer for Devbanane generated. 8004 samples per channel. On board buffer size 16384 samples per channel.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Buffers generated succesfully.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Arming tasks
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Using FPGA task on device 12360003WE as software clock source.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: 2 tasks armed.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Generating triggers.
09/05/2016 14:48:26 AtticusServer.AtticusServerCommunicator: Triggers generated. Sequence running.
09/05/2016 14:48:34 AtticusServer.AtticusServerCommunicator: daqMx Task on device Devbanane finished.
09/05/2016 14:48:35 AtticusServer.AtticusServerCommunicator: Client thinks the run is finished. Buffer statuses:
09/05/2016 14:48:35 AtticusServer.AtticusServerCommunicator: Devbanane 7980/8004
09/05/2016 14:48:35 AtticusServer.AtticusServerCommunicator: *** Expected generation of 8004 samples for this task.
09/05/2016 14:48:35 AtticusServer.AtticusServerCommunicator: Devkiwi 8002/8004
09/05/2016 14:48:35 AtticusServer.AtticusServerCommunicator: _At least 1 daqMx task finished at least 1 second before the client notified the server that it thought the run was finished. This may indicate corruption of the timing signal driving this daqMx task. Reporting to client as error._
09/05/2016 14:48:35 AtticusServer.AtticusServerCommunicator: ***At least 1 daqMx task generated a different number of samples from the expected number. Reporting to client as an error.

Strange behavior: Loading settings file may inhibit proper identification of NI cards

Loading a settings file will cause the myDevicesSettings to be filled with the keys "Dev1, Dev2..etc". The current code (ctrl+f "SETTINGS_LOAD_BUG" in AtticusServerCommunicator.cs) identifies new cards correctly only if they have a key that is different from the keys held in the settings file.

For example: I have one card, Dev1, of type PXI6733. I choose to add another card, Dev2, PXI6535. Everything will work correctly.

However, if I have one card, Dev1, of type PXI6733, and I choose to exchange it for a PXI6535, i.e. I now use Automation Explorer to change Dev1 to a PXI6535. Now, when I load Atticus, the old settings file will already find an old entry for Dev1, and will not update it to the new card type.

All of this can be avoided by deleting the settings file when doing hardware configuration changes, which is why I am unsure if this is a "true bug". To me, it's simply unexpected behavior, and the purpose of this issue post is to keep note of that.

Looping background sequence is hard to stop/control

The box that comes up with sequence run status does not have its own entry in the taskbar. This is not a problem for non-background sequences because the status window is fixed above the main Cicero window. However, with background sequences, the status window can get lost behind Cicero. Thus, to stop the looping, one must minimize Cicero and find this window among the clutter. (I guess it does show in the alt-tab list, though, so maybe that's an easy way to find it.)

It would be nice for this window to either appear in the taskbar, or be easy to call to the front from within Cicero (for example with a button or hotkey). Even better, background loops could be controlled from the Cicero main window: a "abort after this run" check could be underneith the Run/Queue as Loop button, an abort button could also be there, with the same "A" or "ESC" hotkey associated with it.

FPGA Retrigger during first Word of sequence --

If FPGA Retrigger is enabled for first word of sequence, but the FPGA waits a long time, then Cicero will continue ahead with its own software clock without waiting to receive its first clock datagram from the server. This is a known issue at the moment, Cicero was initially written to switch to Network clock only when it received its first datagram of the sequence.

This behaviour should be changed with a UI element somewhere.

FPGA-retrigger debounce

FPGA-retrigger inputs have shown themselves to be somewhat finicky with respect to the signal coditioning of the input signal. Having a per-retrigger user settable "debounce time" would allow users to adjust the sensitivity of the retrigger input, trading retrigger speed against immunity to spurious spikes.

Some misc files no longer included in .zip file

As of 278543f , we no longer require binary-only users to download the entire source tree and navigate it to get their compiled executables. Instead, post-build scripts put all this stuff in ReleaseBuilds folder.

However, there are various misc files that users occasionally will want to use that are not included in ReleaseBuilds (such as Frontpanel installer).

We should either include these files in the ReleaseBuilds directory, or post them in some other way, or direct the user on how to obtain them.

FPGA-retrigger can cause arbitrary skew between software and hardware times tasks

At present, if a FPGA retrigger is used in a sequence, and this trigger takes a long time to happen, this will cause hardware timed tasks to become out of sync with software timed tasks, which have no way of knowing the output state of the fpga.

With some straightforward modification of the FPGA code, it should be possible to allow Atticus to poll the FPGA for the "sequence time" that it is currently at. This would allow Atticus to potentially pause software timed tasks, or inform Cicero that the FPGA is paused.

Perhaps, it would even be possible for Atticus to share this sequence time over TCP/IP with Cicero or with the other Atticus servers (probably preferable for Atticus to share it only with Cicero, and Cicero to share that with the other servers), allowing a soft of distributed-over-TCP/IP software clock that would possibly be more accurate than relying on the on-board software clocks of the various computers (especially if connected over a fairly low-latency TCP/IP network.

FPGA-retrigger: should have a "maximum wait" option

Currently there is basic support (when using an FPGA for sample clock generation) for sequences to pause and be re-triggered in response to some output. However, if the FPGA never receives a retrigger, then the sequence will never finish being generated. In use cases that come to mind (say, retrigger the sequence when the MOT fluorescence reaches some value X), there could be many reasons why this infinite wait undesirable (fail gracefully if the atom shutter is closed and allow the sequence to keep running).

Should be fairly straightforward to have a specifyable "maximum retrigger wait". This would involve changes to both the UI, to Atticus, and to the FPGA code.

Known Issue: GPIB Addresses from old settings files do not load properly

As of version 1.59, the way that GPIB addresses are stored was changed to one that does not require dependencies on NI libraries.

As a consequence, Cicero and Atticus settings files from versions old than this will not correctly load reproduce the old GPIB Addresses when they are loaded in a version newer that 1.59.

I don't know if there is a solution to this problem, since the file deserialization is all handled by C# libraries. But maybe there is some way to alert the user that they have loaded files with outdated gpib addresses, so that they can remove and rebind those gpib channels and devices (that would be a one time fix when migrating settings files from older versions).

Cicero cannot have multiple server on one computer

Cicero treats all servers as Atticus, hence if doesn't make sense to have multiple servers on one computer. However, given that there exists Atticus, Simplicio, and SnippetServer which all connect to Cicero, sometimes it would be nice to have multiple "servers" on one computer.

Need to change tcp ports for the diff servers so they aren't all 5678.

with "network clock", sequence cannot stop

Hi There,

The Cicero/Atticus system in my lab has been functioning properly for a few years. recently we tried to add the "hold and retrigger" function, which seems to operate properly after enabling the "use network clock" option from the Cicero front panel.

But with the "use network clock" option, the sequence cannot stop itself. Instead, we have to manually "abort" the sequence.

Neither Cicero nor Atticus complains about any error before or after the "abort" operation.

Does anyone have similar experience? Any suggestion is greatly appreciated,

Saijun Wu
Fudan University
China

AutoInitiate RFSG alternately initiates and un-initiates

When AutoInitiate is enabled for our PXI-5650, the initiation is attempted every time, but when the device is already initiated, the initiate command actually disables the output. The Initiate command throws an exception, it is caught, and the log notes that the command failed. However, it does not take any action to correct the problem. This seems like a bug in the RFSG drivers: the initiate command perhaps should throw an exception, but it shouldn't disable the output. Obviously, the drivers are not under our control. This bug has been present since the beginning of RFSG integration.

A workaround might be to re-send the Initiate() command in the catch, except that I'm not sure what sort of adverse effect this might have on other cards or in other use cases. Our current "manual" work around is to enable AutoInitate once every reboot of the system, and then to turn it off.

Is there some information in the exception that could be used to determine if sending a second Initiate() command is necessary? Or is it possible to query the card to find out if it is already initiated, and send the Initiate() command conditionally?

Cicero User Manual is out of date

There are a number of features in Cicero not described.

The installation instructions are probably out of date.

The Word Document format is not ideal (perhaps it should be moved to this github repo's wiki, for instance).

@t1mur , I think this would be a good way to increase you to expert wizard level XP points with Cicero.

FPGA Detection with "original" old version of Cicero

To solve my previous problem I have been trying to load an "original" v1.28 version and compare the way it works to my own modified v1.28 version.

I'm using OpalKelly v 4.5 and with my version I detect my FPGA whereas with the original version Aticus does not detect it. Also Using precompiled v1.67 version I'm able to detect it

Do you if there can be some compatility problem with Opal Kelly ? Do you know how to potentially solve them ?

My own Cicero version is based on another modified version which was built some years ago in my group so may be some modifications were already done to support new OpalKelly version or to fix this problem but I couldn't find them.

Once more thank you very much for all your answers

FPGA-retrigger: edge-trigger vs. value-trigger

Currently, FPGA retrigger is set up to only use a "value trigger" scheme when inspecting its retrigger input. More specifically, the retrigger waits for the value of the retrigger input to go HIGH before continuing generation. If the value was ALREADY HIGH, then it continues generation IMMEDIATELY.

For some use cases, this may be the desired behavior (for instance, if the retrigger wait was there to allow a MOT to load to some fluorescence value). In other cases, for instance if trying to sync a particular word of the experiment to the AC line voltage, this is not the most convenient setup.

This could be addressed by having a per-retrigger user-settable flag, chosing whether that retrigger even should be on positive (or negative?) edge, or on positive (or negative?) value.

Known Issue: Retrigger wait non-intuitive behavior

If a word is marked as Wait For Retrigger, then even if the sequence does not receive a retrigger the values (analog and digital) for the BEGINNING of that word) will still get output. If there are analog groups or pulses running during the word they will wait.

In other words, the fpga begins waiting immediately after outputting the first sample of the given word.

This is a known issue, and is not particularly intuitive, but the fix would be rather involved and possibly cause other problems (it would require a major rewrite of the way in which variable timebase segments are calculated), so I think I will leave this as an open issue for now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.