Posted 14 Sep 2021 Hello people! I'm using a NX1P2 controller combined with a CIF105 serial card installed on it. For my project, I get some data that are in ASCII form and I want to keep that form when are extracted in a .csv file. I have established the communication for getting the data but, the problem is that I cannot extract the data in the ASCII form. Data extraction comes in Hex form. I use the NX_SerialRcv instruction for the communication and the AryToString conversion for the data. When using the Watch Tab Page I can display the data in ASCII form but, as far as I understand, this is only for online monitoring. I went through topics here and OMRON manuals for finding any Hex to ASCII conversion instruction but the only info I came across was for CX controllers which cannot be implemented to NX controller. Is there any similar instruction for NX controller or I should create a new Library for the conversion? Any tips and/or a sample would be highly appreciated! Thanks! Man31 Share this post Link to post Share on other sites
Posted 14 Sep 2021 Have you considered that excel can convert Hex to Ascii with a macro. I realize this puts the data in a spreadsheet but not a csv file, perse/ Share this post Link to post Share on other sites
Posted 14 Sep 2021 Are you sure you need conversion? ASCII is simply byte data. What technology are you using to read the bytes to then produce the CSV? Share this post Link to post Share on other sites
Posted 14 Sep 2021 As pturmel pointed out, it's not really a conversion. You'll need to move it to a STRING[] data type. Share this post Link to post Share on other sites
Posted 15 Sep 2021 Hello everyone! On 14/9/2021 at 4:40 PM, BobLfoot said: Have you considered that excel can convert Hex to Ascii with a macro. I realize this puts the data in a spreadsheet but not a csv file, perse/ I know this macro but for the project, the data stored in the SD card of the controller, I want to be sent via email and to avoid any further conversion by myself. On 14/9/2021 at 5:01 PM, IO_Rack said: As pturmel pointed out, it's not really a conversion. You'll need to move it to a STRING[] data type. You are both right! As I stated, I use the AryToString function to get the form that I want but apparently I set the wrong variable for saving data in the FilePut instruction..! Works great! Thanks all of you! I'm sure that I'm going to post again for future questions on my project Cheers! Man31 Share this post Link to post Share on other sites