8-ID
  8-ID Beamline logbook mirror  Not logged in ELOG logo
Entry  Thu Apr 1 18:33:40 2021, Eric Dufresne, 8-ID-E, Controls, function generator out of user Calc records for square wave userCalc6.pnguserCalc7.pngUserCalc5-FULL.pngUserCalc10-full.pngStripTool-userCalc6-FunctiionGenerator.png
    Reply  Thu Jul 15 18:02:42 2021, Eric Dufresne, 8-ID-E, Controls, Basic epics for Keithley 2400 controls, 6ID Keithley 2410 from 6-ID asyn-8ide.pngasyn-18-8ide-serial.pngasyn-18-8ide.pngKeithley2410-6ID.png
Message ID: 775     Entry time: Thu Apr 1 18:33:40 2021     Reply to this: 798
Author: Eric Dufresne 
Type: 8-ID-E 
Category: Controls 
Subject: function generator out of user Calc records for square wave 
I made a function generator out of user Calc records to generate a square wave.
The time axis is connected to the AreaDetector Image Counter.
Because the expression is too long, it connects userCalc7 to userCalc6.
Note that the output of userCalc6 is read in variable A in userCalc7.
The calculation can only be as long as I have in userCalc6 so I had to nest two userCalcs.
In this attachment showing a test, userCalc6 goes from 0 to 1 with a period of NumImages/10 = 60 files, the switch occurs
every 30 files and it goes from 0, 0.5 and 1 in three files.
I would try to keep in the number of periods even like 2,4...
It drives the Keithley Source meter https://logbook.xray.aps.anl.gov/8id/8-ID/528
so this is convenient for higher excitation voltages.

An earlier version is shown in att. 3 for userCalc5.
It did only on 50% off 50%.

My users also made a sinusoidal version in att. 4.

ED
Attachment 1: userCalc6.png  702 kB  Uploaded Thu Apr 1 19:34:17 2021  | Hide | Hide all
userCalc6.png
Attachment 2: userCalc7.png  579 kB  Uploaded Thu Apr 1 19:34:48 2021  | Hide | Hide all
userCalc7.png
Attachment 3: UserCalc5-FULL.png  33 kB  Uploaded Fri Apr 2 16:49:45 2021  | Hide | Hide all
UserCalc5-FULL.png
Attachment 4: UserCalc10-full.png  32 kB  Uploaded Fri Apr 2 17:10:23 2021  | Hide | Hide all
UserCalc10-full.png
Attachment 5: StripTool-userCalc6-FunctiionGenerator.png  7 kB  Uploaded Fri Apr 2 17:18:59 2021  | Hide | Hide all
StripTool-userCalc6-FunctiionGenerator.png
ELOG V3.1.4-395e101