Home AMX User Forum AMXForums Archive Threads AMX Hardware

Data assigned to CHAR doubles every other character

This is an NI-3101 SIG, I can load the exact same program on another controller and it works fine.

--VARIABLE--
persistent char myvariable[100]

--START--
myvariable = "'ABCDEFG'"

When I look at the value of "myvariable" after an assignment statement like this, the content is: "AACCEEG" - it doubles one character, and skips the next. I'm guessing it's gotten locked into some kind of goofy 16-bit mode, but I don't know how to get it out of that mode. Help?

Thanks,

Comments

  • annuelloannuello Posts: 294
    This would most likely be bad RAM in your master. We had 5 (out of 48) DVX-2100 units with the exact same problem. Send it back to AMX if it is under warranty. I suspect a bad batch of RAM ICs managed to get past QC.

    Roger McLean
    Swinburne University
  • Yeah, I contacted AMX, and the verdict was to get an RMA and send it in. However, the support tech said this problem had never been reported before. Maybe not on an NI-3101, but...
  • annuelloannuello Posts: 294
    I think some of the innards of the DVX-2100 is taken from the NI-3101 design. The device firmware appears to be applicable to either model, though they have different port counts. (Similar to the NI-2100/3100/4100 devices.) In discussions with our tech support they had seen a similar issue maybe 5 years ago on two NI-X000 units, but not since.

    I've pondered whether it is worth writing a test program which fully occupies the RAM, maybe via a very large array. The program should then populate the array and then perform a checksum on the array contents to verify whether it has all been written/read okay. The tricky part is determining how much user-RAM is available at run time, since we don't have dynamic memory allocation available to us. I don't know if Duet has dynamic memory allocation - can someone confirm/deny this for me?

    Roger McLean
    Swinburne University
Sign In or Register to comment.