DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

NEED HELP: CONNECT SIGNAL AT DAC-INPUT VIA SCRIPT

Hello,

 

I try to set parameters at an DAC by using the script in DIAdem 11.1.

 

In this case I try to configure a "Signal-Copy-Block" (I tried to translate from german).At first I need to set the number of signalsand the names.After that I have to connect this signals at the Input.

 

The first 2 steps are working well with the following code...

 

Call DACObjOpen("Kopie_Anzeige")                         
    Call DACObjOpen("Dateneingang")
    Call BlPinSigCountSet(anzgesamt)                       
    Call DACObjClose("Dateneingang")
    BlActPinSigOutp(i)= signame
Call DACObjClose("Kopie_Anzeige")

 

 But I cann't find the code for connecting the signals with the input...I tried with

 

Call DACObjOpen("Kopie_Anzeige")
  Call DACObjOpen("Dateneingang")
    BlActPinSigPlug(i) = "connected"
  Call DACObjClose("Dateneingang")
Call DACObjClose("Kopie_Anzeige")

 but this doesn't work !!

 

Can someone tell me why? Did someone knows a solution ? 

 

Best regards,Tobias

 

 

 

0 Kudos
Message 1 of 4
(4,248 Views)

Hi Saibot

 

I am not sure if DIAdem support connecting new signal via scripts.

 

Instead of using your approach try the following. Create a DAC scheme and define the input signals that you may need for your task. These signals can be connected to the other DAC blocks and could be configured. Then use the script to disable or unable the signals. That is much easier then to create and configure new signals by script:

 

Call DACObjOpen("Input")
BlDataSignalName(1)= "InputSignal1"
BlDataActive(1) = "No" ' or "Yes"
BlDataActive(2) = "No" ' or "Yes"
'...
Call DACObjClose("Input")

Hope this helps.

 

Winfried

0 Kudos
Message 2 of 4
(4,244 Views)

Hello Winfried (oder Hallo Winfried),

 

thanks for your quick answer!

 

This would be a solution if I would know the number and names of signals in the MAX-list. In my case, the signal names and the number of them can change.

 

The script I created, opens the dialog to let me choose this signals from the MAX-list. After that I count the number and store the names. With this informations I want to configure the different DAC-blocks.

 

Everything works fine(list-length and names at the blocks), except connecting the signals to the blocks !

 

Is there no other solution ??  Where can I use the command "BlActPinSigPlug" ??

 

Best regards/ mit freundlichen Grüßen,

Tobias

 

 

0 Kudos
Message 3 of 4
(4,207 Views)

Hi Saibot

There is no possibility to connect signals by script. So you have to prepare all possible signals and connect the signals you want to use. The problem is that connecting signals are are very complicate process in the DIAdem core and that a lot of conditions have to be checked:Is the signal available in the input and the output of the cable and the block, is the name unique and so on
The variable "BlActPinSigPlug" makes no sense in the current DIAdem version. This variable (and some similar) are historical.

Best regards

Winfried

Message 4 of 4
(4,126 Views)