From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Control and operate DAC-Button via VBScript

Good morning,

could some please help me with how control or operate a Button in a DAC-Circuit Diagram from a code in VBScript?
Or how could I define a variable of a DAC-Button (Taster) und control it's ON and OFF via VBScript?
Please see the attachment.


Best regards and thanks in advance.
Dan

0 Kudos
Message 1 of 7
(3,036 Views)

Hi Dan,

 

I’m not sure whether I completely understand your goal?

Do you need only sending out a certain value to the hardware at a given time? Is that during the measurement or before starting it?

Or have you some input parameters which are used to decide when and which value should be used for the output?

 

Greetings

Walter

0 Kudos
Message 2 of 7
(2,956 Views)

Hello Walter,

thanks a lot for your reply.
The goal is to give an impulse to the DACmx-driver block in order to operate it for turning on and off a connected electronic device to my testing bench.
I've done it with formel block and it's working by controlling the formal value with 1 and 0 with this code:
Call DACObjOpen("Formel")
   BlFormula = "1"    or    BlFormula = "0"
Call DACObjClose("Formel")

Now the problem ist how could I stop the DAC circuit diagram measurement with code in VBScript?
I mean a command like Call SchemeMeasStart()  but to stop the measurement in DAC and go back to the script?

Thanks in advance
Dan

0 Kudos
Message 3 of 7
(2,954 Views)

Hi Dan,

 

The DAC schme stops if you set the variable "DCAbort" to true or to 1.

 

Greetings

Walter

0 Kudos
Message 4 of 7
(2,950 Views)

Hi Walter,

thank you for your reply.

I have now a weird error is always displayed "There are no measurable signals in the existing circuit diagram." and I can't run the DAC circuit diagram anymore.

Do you know why that is and could you please help me with?

Thanks in advance and regards
Dan

0 Kudos
Message 5 of 7
(2,944 Views)

Hi Dan,

 

it seems that no measured signal is used somewhere, like displaying or saving.

 

Greetings

Walter

0 Kudos
Message 6 of 7
(2,940 Views)

Hi Walter,

do you please know how to stop running a VBScript in DIAdem with code?
Is there a special command like Call AutoQuit()?? but for stopping the executing of the VBScript?

Thanks in advance.

 

Best regards,
Dan

0 Kudos
Message 7 of 7
(2,909 Views)