NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
MaHammoud
Posts: 4
0 Kudos

Cannot write to file, wrong data type.

I have a program where I read data and analyze it and write out the results to a file. I am trying to do something similar and record the high/low 's of my switches. However, after passing them through the chart (where all is fine, 5's and 0's), trying to write it out to a file using ASCII in the Write module stops the run immediately and gives a "wrong data type" error for that module. What am I doing to cause this problem?

Active Participant
CJ_Butler__DASYLab_Pro
Posts: 737
0 Kudos

Re: Cannot write to file, wrong data type.

The ASCII file format requires that there be a data value for each incoming channel at each time stamp... in other words, in complete rows.

Your worksheet is possibly using a Relay to separate the highs and lows? then you need two files.

 

If you want to post the worksheet, then we can look at it and figure out what you've done and a way to overcome it.

- cj
Member
MaHammoud
Posts: 4
0 Kudos

Re: Cannot write to file, wrong data type.

This is how my file looks like. Inside the black box is a bunch of counters that flip when low reaches an inputted value, and vice versa to flip the switch.

Active Participant
CJ_Butler__DASYLab_Pro
Posts: 737
0 Kudos

Re: Cannot write to file, wrong data type.

Can you post the *.dsb, or private message it to me? 

The image doesn't tell me what the module settings are... I'm suspecting the counter, however.

- cj
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page