Reading value from math object
Hello
i'm trying to read value from mathobject, but can't find a method that can read it.
I tried reading value from channel connection using getdatavalue() method but the result is null.
I use c# language with dewesoft references and dewesoft X software.
So is there any method that can read the value? Thanks a lot.
Dear,
thank you for reaching out to us. Reading a math channel is the same as reading any other channel. In the DCOM Manual (Example: read the newest data page 51). Please also refer to our solution Reading live channel data using DCOM and Python.
Kind regards.
@Gregor Šmit
Thanks. And i have 1 problem, T wanna to change formula setting.
Ex: change formula 'AI 0' * 2 to 'AI 3' * 2;
Dear VM KHOI,
the easiest way would be to edit the XML setup file and load it. In the attachment is an image of the xml setup file and formula.
Kind regards.
Attached files:
@Gregor Šmit
could you send me other way? i can't find the formula.xml file.
i want change formula in c# .net application or python application
Dear VM KHOI,
you need to save the Dewesoft setup file to the xml format, by default it is set to .dxs file, and then you can edit this xml setup file. It is completely up to you how you will edit the xml file.
Kind regards.
Attached files:
Dear @Gregor Šmit
So i can't change formula when the application running
Dear VM KHOI,
as I said the easiest way of changing a formula is to change the .xml setup file and load it before the measurement. Once you are storing the data you can not add or change formulas.
Kind regards.
Dear @Gregor Šmit
Thanks for responding.
Now. I want to change amplitude, offset, ... in the function generator.
In the manual, this can be read and written.
Dear VM KHOI,
please find the attached example. It is not possible to directly write to AO channels of function generator so I used the Control channel and control channel writer to write data from control channel into the function generator control channel. In the example I control amplitude - please write analogous code for frequency and offset.
Kind regards,
Attached files:
Dear Gregor Šmit
When I change the amplitude, the amplitude gradually increases.
I need an instant increase in amplitude.
so what to do?
And 1 problem.
When i export multifile (excel *.xlsx) in the my application. It have not data.
picture left: using my application
picture right: using dewesoft X.
Dear VM KHOI,
the amplitude change rate can be defined with control channels. To enable control channels please enable the option Show control channels. For more information please refer to our function generator manual.
Regarding the multifile export I do not know how you are loading and exporting the data. For example: a multifile consisting of files Test_0001.dxd, Test_0002.dxd and Test:003.dxd can be loaded with the command LoadFile("Test_*") and then you can use the export command ExportData with the desired parameters which are described in the DCOM manual.
Kind regards.
Attached files:
@Gregor Šmit
when i change only in dewesoft X.The value of the voltage also does not change immediately.
Ex: Start set 5v then set 7v. The voltage will gradually increase from 5 to 7 over about 1,850 sec.
I want to increase immediately.
Dear VM KHOI,
In the attachment I have send a video where you will be able to see how to set the amplitude change rate.
Kind regards.
Attached files:
@Gregor Šmit
Can i change formula when i stay in Ch.setup monitor and don't storing.
I don't want to use change .xml file menthod. Because when i using c# and reload about 7 times and then this will be loadsetup() function error, i can't know why.
Thanks!
Dear VM KHOI,
I have talked with our developer if it is possible to change formula by not changing the xml and the answer was that this is not possible. Regarding the loadsetup() function error, I believe you are referencing to this post. Would you please be so kind and provide a minimal working example of your code to show us how you are loading the setup file so that we could reproduce the issue and then we might debug the issue.
Kind regards.