man31

MrPLC Member
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

0 Neutral

About man31

  • Rank
    Sparky

Profile Information

  • Country Greece
  1. NX1P2 FTP Data Sending Process

    Hello people! I'm working on a project that part of it, is to send data that are collected in the PLC, via email to office. The PLC and HMI I use (NX1P2 and NB series),they do not support any email instruction, unfortunately.  To overcome this obstacle, I decided to forward those data (saved in .csv file) by using the FTPPutFile instruction and to upload the csv file from PLC to a dedicated folder to the office computer. PLC will be the client (passive) and the computer will be the server. And here is where I need your help.. The set up is offline by using a dummy ethernet switch. I set an IP address in the computer, as well as to the PLC side. If I set the PLC as a server (FTP server ->use -> port 21,pass & username), I can connect from the office computer to the PLC and download the file, by using cmd. When I try to use PLC as a client, Ftpputfile instruction always gives errorid 2407 and erroridex 00000226. In the FTPPutFile instruction box I set the following: ConnectSvr: IP address of PC, port 21, username & pass  SvrDirName: the physical path I set when I configured the FTP site on PC (C:\...) LocalDirName: '/' FileName: '.. .csv'    Further more, in the file explorer I type ftp:\\(IP address of PC), I log in but when I try to create a new folder 550 error is coming up (I suppose this is for permissions). Am I missing something? Do you have any suggestions/guide for making this work? I am not an IT and I am not experienced in that field so any help would be great!   Thanks! Man31          
  2. Hello people! I use the CIF-105 serial card installed on NX1P2 CPU. I have a device that continuously transmits data, which is connected to the serial card and I want to have sample data every one minute. I have two questions for this topic. Question #1: Even though I have set the serial communication instruction (NX_SerialRcv) to operate every one minute, while checking the status of the channels input data at I/O Map, I realized that data keep coming on CIF-105 continuously meaning that operates independently and does not synch with the NX_SerialRcv operation. As a result, buffer on CIF-105 gets full and when data are transmitted to the CPU, some data are discarded from the final data received. I thought that if I could control the port status CIF-105 card (enabled every one minute) I could control the flow of the data and buffer wouldn't be full all the time. The thing is I cannot find any description and data type in the port section of CIF-105 to assign a variable and control the operation of the card. What is the optimum way to control the serial communication and eliminate this issue?   Question #2: Sentences from serial device have the following format: [02]20210624162456,P,11562467,17647325*7C[03][02]20210624162456,A,      79,1000,     980,I    9.7,    30*0B[03][00][02]20210624162456,D,    NORM,    NORM,    RUN ,    STOP,    NORM*28[03] How can I use the start and end for text (02 & 03) so my serial communication with the device to begin from [02] and end at [03]? I tried configuring the RcvCfg with the _SERIAL_START_CODE2 by setting to the the start code byte1 the 16#30 value and to the start code byte1 the 16#32 value but didn't work...   Thanks a lot!
  3. Data from an NX102 to Excel

    Well the article mentioned that semicolons are used instead of commas because in EU we use commas for decimal separator. What a headache.. 
  4. Data from an NX102 to Excel

    As you suggested I checked the csv format ad found that semicolons are often used instead of commas to separate the values, in order to use the comma as the decimal separator. So, I changed the _comma with the _semicolon and voila! As you mentioned, this task was based on PMCR's attachment. Next task is the headers. Thanks for the tip of csv file format ad all the assist! I'm sure that I'll be back with further questions!!   Thanks again!    
  5. Data from an NX102 to Excel

    Lets say that for moving the data in the csv file, I have two tasks: 1) add the headers 2) inserting the data in dedicated cells I didn't use the ',' after the members (is this done with concat instruction?). Would this move the data inserting in one line of csv? If yes, I assume I could use a index for 6 (number of my columns in one line) and at the end the $r$l to change the line, correct? I am a little bit confused of the way that data are saved in a file..  
  6. Data from an NX102 to Excel

    Hello again! As per IO_Rack and PMCR latest attachments, I understand that the writing of headers is for first cell only in each line of csv file, i.e A1,A2,A3 and so on. What I'm trying to do is to add headers in each column for the first line (this is going to be fixed) and then, rest of lines will be filled with the respective data, coming from an array of structures, for a number of 50 lines in csv file. So, lets say that the array of structure (array#1) consist of data of a structure (myStructure1) with 6 members in total. Final csv should be as follows: Line 1: Headers (6 columns) Line 2: Data of array#1 (column1=member1, column2=member2, column3=member3 etc.) Line 3: Data of array#1 (column1=member1, column2=member2, column3=member3 etc.) Line 50: Data of array#1 (column1=member1, column2=member2, column3=member3 etc.) My problem is: 1) I cannot find a way (or I don't understand the way) of adding headers in different columns 2) I cannot insert each value of member in separate cell (column). I assume that I could use concat instruction for 6 members separately but I believe there is a more optimal and effective way instead of it. Even if I use the FileWrite instruction (usage also for array of structures), the values from the array of structures are going to the first cell only. In addition, I cannot find a way of inserting the values to a specific cell. I tried also to move the array of structures in to a new array and then move the new array to csv file but, the problem with this option is that movement can be done only with the same data types..   Any suggestion please? Hope my points were clear.. Thanks
  7. Data from an NX102 to Excel

    I managed to open the project. thanks a lot!! 
  8. Data from an NX102 to Excel

    Yes I have the light version, unfortunately.. So I suppose this version is only for NX controllers..? I'm going to give it a try of writing my own and I will let you know. Thanks a lot!
  9. Data from an NX102 to Excel

    I'm using the NX1P2-9B24DT controller. Is this an issue with the controller or with the license? I tried also OMRON site to download some samples but none of it opend..   Thanks for the pdf file!
  10. Data from an NX102 to Excel

    Hello everybody! For all the above links you have provided, I get the following error from Sysmac Studio. Is there any way skip that error? Is any pdf file available for the above links, for writing data to SD card? Thanks  
  11. NX1P2 Hex to ASCII coversion

    Hello everyone! 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
  12. 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