Author Topic: Open source EEZ Studio for accessing your (SCPI) instruments  (Read 46922 times)

0 Members and 1 Guest are viewing this topic.

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #75 on: February 28, 2019, 04:51:44 pm »
I'll try to follow up on the recent discussion between @dpenev and @Rerouter. First, please note that current function for drawing graph is more or less in line with scope data, but can be to some extent used with data received from other sources.
Graph functions already accept (i.e. recognize) various data formats. For example, I can import file that is generated by Audacity (as RAW headless .wav, 64-bit float) that looks like this in Audacity:



On the ESW side, we can use Attach file option ...



.. and import it into the instrument Terminal.



We have to select proper format of imported data using Configure option, otherwise graph cannot be displayed properly:


Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #76 on: February 28, 2019, 05:09:01 pm »
Some idea how to use JavaScript code within ESW can be found in shortcuts that were already implemented in couple of existing IEXTs, like importing data from Rigol's memory (rigol_waveform_data.js), or starting a datalogging on EEZ H24005 (eez_psu_dlog_start.js).
An example of simple edit box can be found here: enter_start_frequency.js that we can use in a new shortcut:



... that will appear in the list of shortcuts:



... and become visible on the instrument's Terminal, where we'll also open a Debug console on the right (Ctrl+Shift-I or using View ... Toggle Developer Tools option):



When we select the newly added shortcut a new edit box will appear where we can insert e.g. 4000:



... and that value will become visible in Debug console, that is currently the only way to debug scripts:


Offline dpenev

  • Regular Contributor
  • *
  • Posts: 192
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #77 on: February 28, 2019, 08:31:50 pm »
Hi Prasimix,

My Fstart shortcut now looks like bellow:
I have few questions inside the code in the comments.
The edit box input() default value doesn't appear whatever I try.
Could you please comment ?
Do I need to add some more EEZ dependent stuff?

var defaultValues = {
    starFrequency: 1000
};

var values = await input({
    title: "Enter Start Frequency",
    fields: [
        {
            name: "startFrequency",
            displayName: "Start frequency",
            type: "number"
        }
    ]
}, defaultValues); //How to pass the default values?

if (!values || (values.startFrequency !== values.startFrequency)) {
    //session.deleteScriptLogEntry(); //Do I need this?
    return;
}
   
connection.acquire(); //Do I need this?   
connection.command(`:FREQuency:STARt ${values.startFrequency}`);
connection.release(); //Do I need this?

console.log(values); //Do I need this?
 

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #78 on: March 01, 2019, 10:19:10 am »
The following code contain an error, for default frequency startFrequency should be used (that's the answer why default value didn't work):

Code: [Select]
var defaultValues = {
    starFrequency: 1000
};

Don't know how you came up with this code:

Code: [Select]
if (!values || (values.startFrequency !== values.startFrequency)) {
    //session.deleteScriptLogEntry(); //Do I need this?
    return;
}

... but something like this is applicable:

Code: [Select]
if (!values) {
    // user clicked on Cancel button
    return;
}

The following lines are required, so the answer is, yes:

Code: [Select]
connection.acquire(); //Do I need this?
connection.release(); //Do I need this?

Please give us some time, and Martin will try to prepare for you a script skeleton that could be used for collecting data from your instrument.

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #79 on: March 01, 2019, 10:53:55 am »
Hi again, in add_chart_sample.js you can see how to create a graph from comma separated values that Siglent should generate with TRACe:DATA? command as you reported in #31.

Code: [Select]
var defaultValues = {
    startFrequency: 1234
};

var values = await input({
    title: "Enter Start Frequency",
    fields: [
        {
            name: "startFrequency",
            unit: "frequency",
            displayName: "Start frequency",
            type: "number"
        }
    ]
}, defaultValues);

connection.acquire();

await connection.command(`FREQuency:STARt ${values.startFrequency}`);

var data = await connection.query("TRACe:DATA? 1");

session.addChart({
    description: "This is description",
    data,
    samplingRate: 1000, // 1000 samples per second
    offset: 0,
    scale: 1,
    format: 4, // CSV string
    unit: "frequency",
    color: "rgb(255,250,205)", // line color on black backround
    colorInverse: "rgb(51,51,0)", // line color on white background
    label: "This is y-axis label"
});

connection.release();

Offline dpenev

  • Regular Contributor
  • *
  • Posts: 192
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #80 on: March 01, 2019, 12:32:44 pm »
Quote
The following code contain an error, for default frequency startFrequency should be used (that's the answer why default value didn't work):

Code: [Select]
var defaultValues = {
    starFrequency: 1000
};
[/code]

Oh it is not only my lack of javascript experience. It seems I have to go and check my eyes ;)

Quote
Don't know how you came up with this code:

Code: [Select]
if (!values || (values.startFrequency !== values.startFrequency)) {
    //session.deleteScriptLogEntry(); //Do I need this?
    return;
}

I came up to this myself as a way to check if any value is entered (it is not NaN) and if cancel is pressed.
It seems this is working for me.   

Quote
... but something like this is applicable:

Code: [Select]
if (!values) {
    // user clicked on Cancel button
    return;
}
This code doesn't check for empty box + Enter but with working defaults I think it is not an issue.

Quote
The following lines are required, so the answer is, yes:

Code: [Select]
connection.acquire(); //Do I need this?
connection.release(); //Do I need this?

Please give us some time, and Martin will try to prepare for you a script skeleton that could be used for collecting data from your instrument.

Thank you very much!
 

Offline dpenev

  • Regular Contributor
  • *
  • Posts: 192
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #81 on: March 01, 2019, 12:34:24 pm »
Hi again, in add_chart_sample.js you can see how to create a graph from comma separated values that Siglent should generate with TRACe:DATA? command as you reported in #31.

Code: [Select]
var defaultValues = {
    startFrequency: 1234
};

var values = await input({
    title: "Enter Start Frequency",
    fields: [
        {
            name: "startFrequency",
            unit: "frequency",
            displayName: "Start frequency",
            type: "number"
        }
    ]
}, defaultValues);

connection.acquire();

await connection.command(`FREQuency:STARt ${values.startFrequency}`);

var data = await connection.query("TRACe:DATA? 1");

session.addChart({
    description: "This is description",
    data,
    samplingRate: 1000, // 1000 samples per second
    offset: 0,
    scale: 1,
    format: 4, // CSV string
    unit: "frequency",
    color: "rgb(255,250,205)", // line color on black backround
    colorInverse: "rgb(51,51,0)", // line color on white background
    label: "This is y-axis label"
});

connection.release();

Thank you. I will try this as a second step after I finish my simple shortcut buttons.
 

Offline dpenev

  • Regular Contributor
  • *
  • Posts: 192
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #82 on: March 04, 2019, 09:41:31 am »
Hello I have created a few shortcut buttons for SSA3032X.
Attached is the project file and the extension

I want to implement a drop down list selection.
Is this supported and if yes can you give an example?

   
 

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #83 on: March 04, 2019, 10:01:53 am »
I want to implement a drop down list selection.
Is this supported and if yes can you give an example?

Yes, check an example here: enter_start_frequency.js

Offline dpenev

  • Regular Contributor
  • *
  • Posts: 192
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #84 on: March 04, 2019, 02:36:10 pm »
OK I have prepared a pull request with some ssa shortcuts. More stuff on the way.

Sent from my MI NOTE Pro using Tapatalk

 
The following users thanked this post: prasimix

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #85 on: March 06, 2019, 08:58:27 am »
Many thanks for making first change in Siglent's spectrum analyzer IEXT. I can see now the following shortcuts:



I believe that in next version you'll add a script to capture its internal memory data that EEZ Studio can recognize as a graph data.
Looking forward that other members follow your example and contribute with new IEXTs for instruments that they have on their benchtops.

Please take into account that I've added the following notice in GitHub's readme.md:
Quote
IMPORTANT: Please insure that your pull request include IEXT's .zip file with version suffix that is higher then the latest listed in IEXT catalog (i.e. this repository). Do not increase .zip version suffix manually, define it in project file that Build procedure can add it automatically (see Extension definitions).


Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6988
  • Country: hr
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #86 on: April 11, 2019, 07:53:13 pm »
Hi!

Import for Keysight DSOX3000T (InfiniiVision3000X_7_11-v1.zip) is not right.
It imported just few commands.

Regards,
 
The following users thanked this post: prasimix

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #87 on: April 19, 2019, 06:25:34 am »
Hi!

Import for Keysight DSOX3000T (InfiniiVision3000X_7_11-v1.zip) is not right.
It imported just few commands.

Regards,

Thanks for reporting this. We didn't know that some Keysight instrument package could have more then one .SDL file. Mentioned package include two and commands that belongs to second file are not imported. I've opened a new issue for that in GitHub (#71) and we'll fix that in the next release.
 
The following users thanked this post: 2N3055

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6988
  • Country: hr
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #88 on: April 19, 2019, 07:04:14 am »
Hi!

Import for Keysight DSOX3000T (InfiniiVision3000X_7_11-v1.zip) is not right.
It imported just few commands.

Regards,

Thanks for reporting this. We didn't know that some Keysight instrument package could have more then one .SDL file. Mentioned package include two and commands that belongs to second file are not imported. I've opened a new issue for that in GitHub (#71) and we'll fix that in the next release.


Thanks!

If you need help testing let me know.
Regards,
SiniĊĦa
 

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #89 on: November 21, 2019, 11:19:02 am »
Dear all, If you find EEZ studio interesting and useful and would like to help in some way to further develop it, here's an opportunity to do so by making a small donation to it in the crowdfunding campaign currently underway. Thanks in advance to everyone, just spreading the word about the campaign can help.
 
The following users thanked this post: dpenev

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #90 on: November 24, 2019, 06:20:03 pm »
A short video that shows how to start collecting data from your scope in a couple of minutes:


Offline dpenev

  • Regular Contributor
  • *
  • Posts: 192
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #91 on: November 27, 2019, 01:57:43 pm »
Hello,

I am very glad that EEZStudio has got a good progress.
Especially the post processing of the numerical data! 
 
Any plants to work on https://github.com/eez-open/studio/issues/31 or your main concern now are the scopes and power supplies?
Any plans to expand the current scripting support?

Please keep up the good work!
 

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #92 on: November 27, 2019, 02:13:02 pm »
Hello,

I am very glad that EEZStudio has got a good progress.
Especially the post processing of the numerical data! 
 
Any plants to work on https://github.com/eez-open/studio/issues/31 or your main concern now are the scopes and power supplies?

It's very difficult to do any work without equipment and feedback. Many months ago I was documented how to create IEXT (instrument extension) but it seems that no one so far didn't find it interesting to invest some time trying to add support for new instrument.

Any plans to expand the current scripting support?

MicroPython will be part of the EEZ BB3 project, and it's possible that we also add it on the EEZ Studio side. Currently we are busy trying to put as much as possible features in the EEZ BB3 firmware (presuming that crowdfunding will be successful) so with our limited resources I cannot say when the next EEZ Studio version (M4) will be released.

I'd also like to thank the two backers who have donated to EEZ Studio so far.

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #93 on: December 15, 2019, 09:19:59 am »
The EEZ Studio latest build got its first implementation of MicroPython for EEZ BB3.




The crowdfunding is still active, please consider making a small donation to make the EEZ studio even better and more usable for various other instruments.

 
The following users thanked this post: Rerouter, Qw3rtzuiop, s8548a

Offline Pjoms

  • Regular Contributor
  • *
  • Posts: 51
  • Country: se
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #94 on: April 28, 2020, 07:26:00 am »
Hello!
I'm playing around with Java-script in EEZ Studio and my EEZ H24005 from the crowdfunding.
I'm also a total beginner on Java-script...

Is it possible to read a measurement from the instrument into a variable?
I can read the value, but I'm not able to get into a variable.

This works, and display the measurement:
Code: [Select]
connection.acquire();
connection.command('MEAS:CURR? CH1');
connection.release();

This also displays the measurement, but I got nothing in my variable:
Code: [Select]
var chargeCurr

connection.acquire();
chargeCurr = connection.command('MEAS:CURR? CH1');
connection.release();

console.log(chargeCurr);


Is it possible to use DLOG and redirect the value into a variable instead of a file?


What I'm playing with here, as just a goal for education, is to make a simple charger for a 18650 LiPo-cell.
1. Output 4.2V, 1,5A
2. Switch off the output then the current drops below 150 mA
3. Switch off the output if it still on after 4h
« Last Edit: April 28, 2020, 07:32:23 am by Pjoms »
 

Offline mvladic

  • Contributor
  • Posts: 14
  • Country: hr
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #95 on: April 28, 2020, 08:03:38 am »
Hello Pjoms!

You need to await for command to finish, like this:

Code: [Select]
var chargeCurr

connection.acquire();
chargeCurr = await connection.command('MEAS:CURR? CH1');
connection.release();

console.log(chargeCurr);

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
 
The following users thanked this post: Pjoms

Offline Pjoms

  • Regular Contributor
  • *
  • Posts: 51
  • Country: se
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #96 on: April 28, 2020, 12:49:18 pm »
Thanks! Another major thing was the need to use connection.query instead of connection.command.

chargeCurr = await connection.query(`MEAS:CURR? CH1`);

 
 
The following users thanked this post: prasimix

Offline Pjoms

  • Regular Contributor
  • *
  • Posts: 51
  • Country: se
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #97 on: April 29, 2020, 07:20:15 am »
Now I'm in some deep water here, as a totally beginner in Java Script...
I have copied the code for the input dialog from the script "Dlog start" and modified it for my purpurs.
It went quite well, but suddenly, and for me without any obvious reason, the script stopped to work.

After some frustrating, testing, more frustrating and testing (without knowing what I'm doing or what the error messages means...) it turns out that it works just fine if I just change the name for the storage.getItem!
My best guess is that it is an array that has been messed up some way.
I'm using the EEZ PSU software simulator ver. v1.1 as instrument by the way.
Can someone bring some light over my confusion here...?


The original lines in Dlog start
Code: [Select]
var defaultValues = storage.getItem("EezDlogValues", {
...
storage.setItem("EezDlogValues", values);



My lines that not working anymore
Code: [Select]
var defaultValues = storage.getItem("LiPoChargeValues", {
...
storage.setItem("LiPoChargeValues", values);


If I just change the name, the code works...
Code: [Select]
var defaultValues = storage.getItem("LiPoChargeValuesX", {
...
storage.setItem("LiPoChargeValuesX", values);



The console give me this messages then I try to run the script, but I'm afraid that I'm not able to understand much of it...
Code: [Select]
Uncaught TypeError: Cannot read property 'toFixed' of undefined
    at Object.roundNumber (C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\roundNumber.js:11)
    at TimeUnit.formatValue (C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\units.js:19)
    at TimeUnit.formatValue (C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\units.js:116)
    at GenericDialog.props.dialogDefinition.fields.forEach.fieldProperties (C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-ui\generic-dialog.js:49)
    at Array.forEach (<anonymous>)
    at new GenericDialog (C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-ui\generic-dialog.js:47)
    at zf (C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:127)
    at Wg (C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:163)
    at ah (C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:176)
    at hi (C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:221)
roundNumber @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\roundNumber.js:11
formatValue @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\units.js:19
formatValue @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\units.js:116
GenericDialog.props.dialogDefinition.fields.forEach.fieldProperties @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-ui\generic-dialog.js:49
GenericDialog @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-ui\generic-dialog.js:47
zf @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:127
Wg @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:163
ah @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:176
hi @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:221
ii @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:222
Ki @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:238
fi @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:234
uf @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:232
Si @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:252
Ti @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:252
Yi.render @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:260
(anonymous) @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:263
Qi @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:249
aj @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:263
render @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:265
showDialog @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-ui\dialog.js:125
Promise @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-ui\generic-dialog.js:260
showGenericDialog @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-ui\generic-dialog.js:259
resolve @ C:\Program Files\EEZ Studio\resources\app.asar\dist\instrument\window\script.js:23
input @ C:\Program Files\EEZ Studio\resources\app.asar\dist\instrument\window\script.js:22
(anonymous) @ VM536:16
(anonymous) @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\script-engines\javascript.js:20
(anonymous) @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\script-engines\javascript.js:7
__awaiter @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\script-engines\javascript.js:3
run @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-shared\script-engines\javascript.js:12
doExecuteShortcut @ C:\Program Files\EEZ Studio\resources\app.asar\dist\instrument\window\script.js:224
executeShortcut @ C:\Program Files\EEZ Studio\resources\app.asar\dist\instrument\window\script.js:253
executeShortcut @ C:\Program Files\EEZ Studio\resources\app.asar\dist\instrument\window\terminal\terminal.js:257
executeShortcut @ C:\Program Files\EEZ Studio\resources\app.asar\dist\instrument\window\terminal\toolbar.js:76
onClick @ C:\Program Files\EEZ Studio\resources\app.asar\dist\eez-studio-ui\action.js:26
da @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:14
ka @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:15
la @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:15
ya @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:17
Ca @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:18
Aa @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:18
Fa @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:21
Gd @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:84
Pi @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:249
Nb @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:39
Jd @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:86
Ri @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:250
Id @ C:\Program Files\EEZ Studio\resources\app.asar\node_modules\react-dom\cjs\react-dom.production.min.js:85



I don't know if this means anything, but sometimes then I just scrolling in the code the console spits out a burst of messages like this.
Code: [Select]
Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.
    at a.scrollLines (index.min.js:1)
    at p.$renderChanges (index.min.js:1)
    at index.min.js:1
scrollLines @ index.min.js:1
$renderChanges @ index.min.js:1
(anonymous) @ index.min.js:1
requestAnimationFrame (async)
schedule @ index.min.js:1
scrollToY @ index.min.js:1
onScrollTopChange @ index.min.js:1
n._signal @ index.min.js:1
setScrollTop @ index.min.js:1
$computeLayerConfig @ index.min.js:1
$renderChanges @ index.min.js:1
(anonymous) @ index.min.js:1
requestAnimationFrame (async)
schedule @ index.min.js:1
scrollToY @ index.min.js:1
onScrollTopChange @ index.min.js:1
n._signal @ index.min.js:1
setScrollTop @ index.min.js:1
scrollBy @ index.min.js:1
onMouseWheel @ index.min.js:1
n._emit.n._dispatchEvent @ index.min.js:1
onMouseWheel @ index.min.js:1
(anonymous) @ index.min.js:1
 

Offline mvladic

  • Contributor
  • Posts: 14
  • Country: hr
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #98 on: April 29, 2020, 07:40:27 am »
Nothing is wrong with the "LiPoChargeValues" name per se. Problem is what is currently stored under that name in local storage. For some reason it contains invalid value for some of the fields. Can you open console, print the contents of "LiPoChargeValues" like this:

Code: [Select]
console.log(JSON.stringify(storage.getItem("LiPoChargeValues")))

and send here the result.
 

Offline Pjoms

  • Regular Contributor
  • *
  • Posts: 51
  • Country: se
Re: Open source EEZ Studio for accessing your (SCPI) instruments
« Reply #99 on: April 29, 2020, 08:27:58 am »
The console returns the follow:
Code: [Select]
{"startCurrent":1.5,"stopCurrent":0.1,"maxChargeTime":10}
It turns out that if I use these exact variabels the script work, but if I change a name or add an other variable it dosen't work anymore.
Then if I change the name as I mentioned before, the code works again. After that it looks like it is "locked" to this structure.

It also looks like those values lives even outside the actual script, eg it is possible to access from another script.
Is there a need or a way to clear or reset the string/array someway then changes are done?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf