NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Write data to Text File generates error

Solved!
Go to solution

Hi All ,

I Need to write data into a file using TestStand and i configired the input and out as Below but i am getting error as "An error occurred calling 'Write' in 'ITextStream' of 'Microsoft Scripting Runtime' [Error Code: -2146828234] "

I have followed the same Procedure for Read Text which works fine for me.

Hope few others might have faced the problem/ or i may be doing something wrong.

Do Needful.

TestStand Write Error.PNG

Pazhanivel Thiruvenkadam,
CertifiedLabVIEWArchitect|| CertifiedTestStandDeveloper,
Currently able to Access LV2015&LV2017
0 Kudos
Message 1 of 6
(2,723 Views)
Solution
Accepted by topic author PalanivelThiruvenkadam

Problem found, While opening a file i used IO Mode as ForReading instead of ForWriting.

Unnecessarily thread created, but then hope this may help someone later when they face particular issue.

Pazhanivel Thiruvenkadam,
CertifiedLabVIEWArchitect|| CertifiedTestStandDeveloper,
Currently able to Access LV2015&LV2017
Message 2 of 6
(2,707 Views)

How can I get the Object reference of a Test file in TestStand?

You are using Locals.GTS__TAG_FILE local variable to give the File object reference. So, I think you should get the Text File Object reference and store it in this Local variable before.


Can you please share me how you got the Object reference of the Text file (Open a File) and Where you specified Write/Read Modes.?

 

Thanks and Regards,

Manikandan

0 Kudos
Message 3 of 6
(1,841 Views)

Create a Action Step and change the adapter in Properties-General tab to ActiveX/COM, and create a Variable with Object Reference as Type and map the same in the Module Tab (Object Reference).

Pazhanivel Thiruvenkadam,
CertifiedLabVIEWArchitect|| CertifiedTestStandDeveloper,
Currently able to Access LV2015&LV2017
Message 4 of 6
(1,825 Views)

Hi Palanivel,

How do I assign a text file's object reference to this variable (that I created with type Object Reference)?

 

Thanks,

Mani 

0 Kudos
Message 5 of 6
(1,808 Views)

To Open File use this snippet information

 TS_CreateFileRef.PNG

 

 

Pazhanivel Thiruvenkadam,
CertifiedLabVIEWArchitect|| CertifiedTestStandDeveloper,
Currently able to Access LV2015&LV2017
0 Kudos
Message 6 of 6
(1,764 Views)