horatius Posted June 6, 2009 Report Share Posted June 6, 2009 I fill an array (left side in picture) that I want to send to DAQmxWrite (right side in picture). In practical my array has only 2 different values and an INT8 type would be sufficient. However DAQmxWrite does only accept double arrays. Therefore I have to waste memory. Is there a solution? Download File:post-11132-1244197380.vi Also it's not possible anymore to define array outputs in Mathscript as integer. Also if I have integer within the Mathscript node I'm compelled to convert them to douple type. In previous versions of LV this was possible. Quote Link to comment
jg69 Posted June 6, 2009 Report Share Posted June 6, 2009 Crosspost: http://www.labviewforum.de/index.php?s=&am...ost&p=73995 Quote Link to comment
jdunham Posted June 6, 2009 Report Share Posted June 6, 2009 QUOTE (horatius @ Jun 5 2009, 03:13 AM) I fill an array (left side in picture) that I want to send to DAQmxWrite (right side in picture). In practical my array has only 2 different values and an INT8 type would be sufficient. However DAQmxWrite does only accept double arrays. Therefore I have to waste memory. Is there a solution? Why don't you just use a smaller array and use regeneration mode? If your input array is really complicated, then you can write some code to check the output status, and write to the output buffer in stages, keeping well ahead of the DAQ write mark. Granted, this is not as simple as the code you posted, but if you are running into memory problems, that's an easier fix than waiting while NI ignores your request to change the API. Quote Link to comment
horatius Posted June 9, 2009 Author Report Share Posted June 9, 2009 Yes I tried already in regeneration mode. I posted it here (German Labview Forum). I can translate it if you think you can help and don't speak German. The problem was that in regeneration mode the PC worked unstable. The buffer couldn't filled as fast as necessary. The problem occured sometimes only after few hours of working. Then I tried to increase the buffer but failed. I think I didn't increase the buffer in the right way. You can look the VI (posted link above) and maybe you know how to adjust the buffer properly. Opposite in non-regeneration mode the PC works without problems or interruptions but the array length can be very large. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.