DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change PkPckOffset in DAC Shift register

Hello,
 
I want to change Offset and new packet size values in a shift register block. I try with the following code but the new values are not updated in the DAC.
 
[Script]
 
Dim Nsec
Dim QtyWerte
Nsec= 500
QtyWerte= 5000
Call SchemeLoad("C:\temp\test\test.DAC")
Call SchemeCheck("normal")
call DACObjOpen("Schieberegister1")
      PkPckOffset=Nsec
      PkPckSz=QtyWerte
call DACObjClose("Schieberegister1")
Call SchemeMeasStart()
 
[/Script]
 
Does anyone know why this code don't work ?
 
Thanks
 
Alfons
0 Kudos
Message 1 of 10
(4,762 Views)
Hello,

I have tested this code and it code works fine.

There are some possible problems depending on the settings of this block in your Scheme file. If the Offset definition in the stored version of "Schieberegister1" is set to "Percentage of the packet size", the 500 (Nsec) will be ignored because 100 is the maximum vor this setting. If the checkbox "new packet size" is not checked, the 5000 (QtyWerte) will also be ignored.

In addition, it is not recommendet to change the scheme between Call SchemeCheck("normal") and Call SchemeMeasStart(). In this case, it seems to work, but changes in the single value system can cause lots of problems. You should do the changes directly after loading.

regards
Ulrich Bierwisch


0 Kudos
Message 2 of 10
(4,729 Views)

Hello,

I have modified the script as you suggest me but it stills not working.

[Script]

Call SchemeLoad("C:\temp\test\test.DAC")

call DACObjOpen("Schieberegister1")
      PkPckOffset=50
      msgbox PkPckOffset
      PkPckSz=2000
call DACObjClose("Schieberegister1")
Call SchemeCheck("normal")
Call SchemeMeasStart()

[/Script]

I have installed the demo of the new version 10.2.1 and the script work properly.

But at work we use DIAdem 9.10.2036, does there is a bug in this version?

I have this error message on the message box opening:

 Ungültige Verwendung von Null: "PkPckOffset"

 

PS: To administrators, I am sorry for the empty posts, a bug has happened when I have sent the post.

 



Message Edited by AlfonsUK on 12-05-2007 05:07 AM

Message Edited by AlfonsUK on 12-05-2007 05:09 AM

Message Edited by AlfonsUK on 12-05-2007 05:09 AM
0 Kudos
Message 3 of 10
(4,711 Views)

 



Message Edited by AlfonsUK on 12-05-2007 05:00 AM
0 Kudos
Message 4 of 10
(4,711 Views)

 



Message Edited by AlfonsUK on 12-05-2007 05:01 AM
0 Kudos
Message 5 of 10
(4,711 Views)

 



Message Edited by AlfonsUK on 12-05-2007 05:01 AM
0 Kudos
Message 6 of 10
(4,711 Views)

 



Message Edited by AlfonsUK on 12-05-2007 05:01 AM
0 Kudos
Message 7 of 10
(4,711 Views)

 



Message Edited by AlfonsUK on 12-05-2007 05:00 AM
0 Kudos
Message 8 of 10
(4,711 Views)
Hi,

I have looked into the version history of this block. Unfortunately, there is a known problem with the scripting of variables in this block in Version 9. This problem is fixed in version 10.

regards
Ulrich Bierwisch

0 Kudos
Message 9 of 10
(4,674 Views)

Hallo,

So I have no way of solution with the version I am using, I will try to move to the new one.

Thanks again for your help, the idea to create a triggering signal in the advanced.DAC you give me last time work now perfectly with my application.

Best regards,

Alfons

0 Kudos
Message 10 of 10
(4,655 Views)