Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Property at design time and run time differ outputs

On AI OCX Object I have set property in BUFFER>>Number of Scan to acquire = 600, Allocation Mode = Host Memory, Return data type = scaled data only And in Clock >> Clock=Scan, Clock Sourec Type = Internal,Scan/Second = 600 And in CONDITIONS>> Condition=Stop and Continuous..

But when I want to set them at runtime I am not getting proper output


I have defined at runtime...
CWAI1.NScans = 600
CWAI1.ScanClock.Frequency = 600
CWAI1.AllocationMode = cwaiHostMemory
CWAI1.ScanClock.InternalClockMode = cwaiFrequency
CWAI1.ScanClock.ClockSourceType = cwaiInternalCS
CWAI1.UseDefaultBufferSize = True
CWAI1.Configure CWAI1.start


Please guide me ... where I am gettin
g wrong


Best Regards"
0 Kudos
Message 1 of 4
(3,282 Views)
Hmmm, it looks like everything you have is correct. Except that it appears you haven't specified the channels you want to acquire from. I would expect to see something like this:

    CWAI1.Channels.RemoveAll
    CWAI1.Channels.Add "1,2,3"

I have attached one of the shipping examples that also programatically specifies the properties. You might use it as a comparison to your code. I hope this helps.

Regards,

Russell
0 Kudos
Message 2 of 4
(3,282 Views)
Thanx Russel for your suggestion!

Actually I have not written this in question beacuse without this how can I get data...

These lines are written before my code..

CWAI1.Channels.RemoveAll
CWAI1.Channels.Add Channel_name

I dont understand the problem, Graph plotted is very when we directley specify in OCX properties... rather then at run time..
0 Kudos
Message 3 of 4
(3,282 Views)
Does the attachment have the same problem as your code? If so, then perhaps you could tell me a little more about what the data does look like verses what it is supposed to look like. Exactly, what is different about it? Maybe some screen shots would help too?
0 Kudos
Message 4 of 4
(3,282 Views)