DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

write protected channel error

Hi ,

 

Am getting an error called this operation cannot work with write protected channels.

 

AM sending the code in attachment. and its related dat file.

 

Help me getting through this error please.

 

Mentioned in the script what I am doing exactly.

Download All
0 Kudos
Message 1 of 7
(3,959 Views)

Hello Rash.patel,

 

Yes, you are going to manipulate an implicit channel. An implicit channel is described just by 3 values: start value, step width and number of values. Those channels are write protected. To expand this channel please use the command:

 

Call ChnValExpand("[1]/Time axis")

 

Greetings

Walter

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

Hi Walter,

 

I tried adding your line inside my script test.vbs after dataload command.

 

But still I am getting the same error.

 

Where can i actually add that line??

0 Kudos
Message 3 of 7
(3,951 Views)

Hi Rash.patel,

 

it seems that you are refering to not existing channels. You use the channel number for this - in your example 4 and 5. These channel numbers do not exist. If I use the following it works fine:

 

 

  Call ChnValExpand("[1]/Time axis")
  Call ChnAreaInsert0("[1]/Time axis", 1, Row+1)
  Call ChnAreaInsert0("[1]/Event Input", 1, Row+1)

 

 

Greetings

Walter

0 Kudos
Message 4 of 7
(3,949 Views)

HiWalter,

 

I understand the Implicit channel and need to expand it. Thanks.

 

But in my script 

 

Step 1: Create two more channels. channel 3 and channel 4

Step 2:  go to analysis and search in accleration channel where its value is reached 1.xxxxxxxx

Step 3: Where ever it has reached 1.xxxxxxxx in accleration channel from that point in channel 3 and 4, Paste all the std values. Std values are in the attached excel file.

 

  This series of discussion went in ths link

http://forums.ni.com/t5/DIAdem/Formula-for-finding-channel-value/m-p/1489256#M13057

 

It works fine with other dat files. But now am using implicit channels, which contains an extra channel event input, which i dont need.

 

How can i modify my script for this new implicit dat file  ??

 

Any suggestions on this?

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

Hi,

 

Maybe I don't understand you, but if there are channels to which you can reference correct and if there are no implicit channels which you are going to manipulate, the script works fine.

 

Greetings

Walter

0 Kudos
Message 6 of 7
(3,944 Views)

Hi Rash.Patel,

 

The problem I had when running your script was that the Excel limit channels were not loading.  This is because the VBScript was looking for the Excel file and the *.stp in the same folder as the *.dat file.  When I changed the script to look for the *.xls and *.stp files in the same folder as the script-- the way that you do the *.TDR file, your script ran through with no errors.  I then had to change your *.TDV and *.TDR files to reference channel indices instead of incorrect channel names-- here are the updated files.  It looks like you posted unrelated acceleration data that doesn't go with your limit files-- either that or your limit files need a different timebase.  For that you could import a new limit time channel or you could make the limit channels waveforms.

 

Walter is quite right that the ChnValExpand() command is the way to make an implicit channel editable, but as far as I can tell you aren't needing to edit the time channel in the script you posted.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 7 of 7
(3,935 Views)