DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

PicExport / Clipboard Error on "large" Channel Curves

Hi,

 

after googling and searching this forum I can see, that there are multiple users, who have different problems with PicExport and the clipboard. Mostly they seem to be related to remote access.

 

For my case, I'm just local to my PC and no other program accesses the clipboard.

 

But if I try to export a Report with a curve (channel), which exceeds a particular size of 8826335 samples, I receive an error message, that the clipboard can't be accessed.

 

I use Diadem 11.2 SP1 (32 bit) on Win7 (64 bit)

 

It would be great if someone could verify this!

 

Just run the following code. And the last command should cause the attached error (Sorry, I have only the German version installed) 

 

The same with the PicExport command, as it uses the clipboard.

 

(If nothing happens, maybe increase numOfSamples, maybe this size is system dependend)

 

Any help is appreciated! But for work-around ideas, I need a picture in the end, not a pdf.

 

Thanks!

 

 

Call DataDelAll(1)

Dim numOfSamples : numOfSamples = 8826335

Call ChnLinGen("KanalY", 0, numOfSamples - 1, numOfSamples) ' Generate a huge bunch of data
ChD(numOfSamples \ 2, "KanalY") = 0 ' Make sure data is actually using the memory

Call GraphSheetShow(1)


' Taken from the examples---------------------------------------------
Call PicDelete()                            'Deletes all objects

Call GraphObjNew("2D-Axis","New_2DAxis1")   'Creates a new 2D axis system
Call GraphObjOpen("New_2DAxis1")            'Opens the axis object
  D2AxisBackColor  ="yell."                 'Sets the background color
  D2AxisTop        =10                      'Sets the position
  D2AxisBottom     =10
  D2AxisLeft       =10
  D2AxisRight      =10

  Call  GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
  Call GraphObjOpen("New_Curve")            'Opens the curve object
    D2CCHNX          ="[1]/[1]"             'Defines the x-channel
    D2CCHNY          ="[1]/[1]"             'Defines the y-channel
    D2CurveColor     ="red"                 'Defines the curve color
  Call GraphObjClose("New_Curve")           'Closes the curve object

Call GraphObjClose("New_2DAxis1")           'Closes the axis object
Call PicUpdate()                            'Updates the report
' -----------------------------------------------------------------------


Call PicPrint("WinClip")  ' Try to use the clipboard, same error with PicExport()

 

 

 

0 Kudos
Message 1 of 7
(5,311 Views)

Hi NaniB,

 

It works on my laptop with 16 GB of RAM and DIAdem 2014.  I was able to copy the yellow rectangle with the straight red line to my clipboard using your code (very nice!) and paste the clipboard manually into a Word document.

 

How much RAM do you have available when you try this?

Brad Turpin

DIAdem Prroduct Support Engineer

National Instruments

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

Hi NaniB,

 

It works on my laptop with 8 GB of RAM, Win 7and DIAdem 2014.

 

Kind Regards,

Philipp K.

AE | NI-Germany

0 Kudos
Message 3 of 7
(5,260 Views)

Hi Brad, Hi Philipp,

 

thank you for your replies!

 

Unfortunately I have only access to machines with 4GB of RAM.

 

I was able to test it now on another machine with the same configuration and the error starts to occure from the exact same number of samples.

 

And I tried with an XP machine (32 bit), also Diadem 11.2 SP1. Here occured another error, extending my test script to a much higher number of samples in the test channel. (numOfSamples > 15000000) (See attached image)

 

So it definetly depends on the PC hardware and/or OS, but not only on the memory size. (As I said, all machines had 4GB RAM)

 

But okay, I don't want to go into detail to much. It seems to be a problem with the memory or better, somehow the swapping of big data doesn't work poperly. Maybe it is even a Windows bug. But I guess no one is interested in fix this in Diadem 11 anyway.

 

So I probably somehow have to live with this limitation.

 

It just bothers me, that

 

a) this limit is very low compared to the Diadem overall capabilities and

b) I see no way to check for the limit inside the script because I can't see the logic behind this error.

 

So, I would really appreciate it if you could test again my script with much higher numbers of samples, i.e. go with numOfSamples up to numOfSamples = GlobChnLength (I mean, in theory this should be the upper border? ^^ XD)

 

Just to see if the limit before the error occures is just higher on your machines due to the higher memory resources, or if really the swapping works better in Diadem 2014.

 

Thank you very much again!

0 Kudos
Message 4 of 7
(5,252 Views)

Hi NaniB,

 

I tried your script with the following settings:

 

numOfSamples =  8826335
numOfSamples = 10000000
numOfSamples = 50000000
numOfSamples =100000000
numOfSamples =GlobChnLength

All but the last one worked fine.  The last one, which is equivalent to 2147483647, created the channel in the Data Portal, built the graph in REPORT, but the VBScript never finished, so I assume the Clipboard export command hung.

 

I still don't see any transparency here, just a red line graphed on an axis system with a yellow background.  Transparency is usually determined as a percentage from 0% (solid) to 100% (invisible).

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 5 of 7
(5,240 Views)

Hi Brad,

 

Thank you very much again!

 

You must have some nice hardware over there! 🙂

 

It is good to know, that with different hardware and/or Diadem Versions the problem seems to disappear.

 

Your support in this forum here is really great!

 

I will try to find some time to try some different installations. And then I will discuss with my colleagues, where to go from here.

 

Just one thing, what do you mean with "transparency"? I read no the previous posts 2 time and I don't understand? I didn't want anything to happen with transparency? And the colours are just from the NI/Diadem examples, where I took the example code to draw curves from scratch from within the script.

 

Regards,

Daniel

 

0 Kudos
Message 6 of 7
(5,224 Views)

Hi Daniel,

 

I agree, now I don't see "transparency" here either.  I must have confused this post with a similar one that only had trouble when using transparency.

 

Sorry for the red herring,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 7 of 7
(5,208 Views)