simonongsk

MrPLC Member
  • Content count

    40
  • Joined

  • Last visited

Everything posted by simonongsk

  1. Hi:         How to use data type Word to perform math function without converting to Int or Uint ?  -----> Error    26    The '+' operator is not supported by WORD data type.     thanks    
  2. Using Word to perform calculation

    WordCounter:=WordCounter+UINT#1; The error :Error    26    The '+' operator is not supported by WORD data type.  
  3. Hi:         I am planning to use NX with Encoder Card  couple with Omron Rotary Encoder for measuring product length. ( GX-EC0211 /EC0241) or may be (NX-EC0112, I read there is proble with this card , here https://forums.mrplc.com/index.php?/topic/34896-problem-pulse-reading-with-fast-counter-card-in-nx2/ ), but whatever it is I need to know is there any specific Instruction in Sysmac Studio that is tailored for Fast Counter or Encoder (something Like PRV in CX Programmer or special function in CJ-CT021 where start/stop counter and changeable preset counter are available).  The Length measurement is straight forward and is only a small part of the overall program.  Basically is Start ---> measure to length----> Cut --->Repeat again.  I read through the Instruction Reference Manual and I am unable to find one.   Anyone have any idea or any sample program (Sysmac Studio only ) that I can refer to ?    Thanks     
  4. Is there any instruction in Sysmac Studio Structure text to detect rising Edge (DIFU/DIFD) ?
  5. NJ Modbus

    I need to write c# with modbus TCP to read NJ,  Anyone able to to use PC communicate with NJ by using Modbus TCP?  Any Function need to be added in the PLC, for Example , PC to read Register 40000 to 40020 ?    
  6. Edge Detection in Structure Text

    @panic mode,  Well your explanation really give me a hard knock! PLC 101!!! Thanks for the lesson!
  7. Edge Detection in Structure Text

    How will it work if I am only interested in Trigger Up?    timeOut:= Timer(TimeBit,UINT#100,TimerSt,TimerDone,ElapseTime); IF ( timeOut<>PreviosState ) THEN         Counter:=Counter+1;    PreviosState:=timeOut;; END_IF; The Counter will increase  by 2.   with ladder, with dIFU, that will not happen
  8. NA HMI Listbox

    I read  http://forums.mrplc.com/index.php?/topic/33282-read-an-array-of-strings-from-nj-to-na/.  What I looking at is how to add items to Listbox with array from NX cpu.   There is no "Items.Add" member for the listbox. I hope the listbox for NA behave the same way like the NS or Proface. as below code from the link above sure will not work   Sub ListBox_Update    Dim List_obj As Object     Dim array(100) As String    Dim x As Integer    For x = 0 To 99        array(x) = ListItems(x)    Next x    List_Obj = array    listbox0.SetItems(List_Obj)End Sub Anyone  have try NA Listbox and please share your code   Thanks        
  9. How to map physical Input and output into variables type of Word?  It is easy in CX programmer with Mov 0 to  Inp_Word_0  (type Channel) Global Variable  -----> Inp_Word_0 ,      Inp_Word_1     Type Word                                       Out_Word_0,        Type Word                           Example in NX1P2   map Input Bit 00 to Input Bit 15 to a Inp_Word_0,     and    map  Input Bit 16 to Input Bit 23 to a Inp_Word_1                                      map Outpu Bit 00 to Input Bit 15 to a Out_Word_0,                                         
  10. Map Physical Input and Output to Word

    It will only work if I am using modular input and output . But I am using nx1p2. There is no channel as compare to Cp1e
  11. Map Physical Input and Output to Word

    I am using the above method, I thought there is a more simple method instead of writing bits to bits. Is there a way of assigning a variable at IO Table directly with the union variable?  
  12. NX102 Ethernet IP

    Hi :        IF there are 10 global variables in the NX102        Count_1....................Count_10 (all of the variables are UINT)   what is the   Class ID Instance ID. and Attribute ID for reading from and writing values to the above said variables? I am unable to find the the appropriate manual below is an Application that is able to peek at Omron EIP PLC https://sourceforge.net/projects/enipexplorer/
  13. NX102 Ethernet IP

    Hi:          I am able to read a variable . But not array, not even a single element.  The service code is 4c. Have you try? 
  14. Hi Micheal:

                             Have you tested NX102 with Multiway using Fin Ethernet TCP or UDP? I am unable to connect and send command with the Multiway.  I had been trying for the past week. It is rather straightforward with CJ  PLC . Can you help?

    my id is simonongsk

    my email is simon.ongsk@yahoo.com

    Thanks 

    Fint routing.png

    Multiway.png

    TCP.png

    Variable.png

  15. NX102 Fins Command with PC

    "- DNA must never be 00. Your Sysmac Studio screenshot shows that the PLC uses default Local Network 01, so DNA should be 01 as well. " Which part of the sysmac studio screen shot show the Default Network that I should change? In CJ it is much simpler. "but the data you are sending to PLC is incorrect"  - the multiway error said so.  Multiway work with CJ Fins command, i believe the NX/Nj should behave the same way. Any idea?        
  16. Anyone tested NX102 builtin Ethernet Port 1/2 for Fins command with Multiway? Example  PLC Port 1  IP is 192.168.1.10  , PC Address is 192.168.1.88 FINS Node Address of built in Ethernet IP port is 11 (grey out) as it follow the setting at port 2   ICF   80 RSV  00 GCT  03 DNA  01   (Direct PC to NX102) DA1   0A  (IP node 10) DA2  00 SNA 01  (Diect PC to NX102) SA1  58 SA2  00 SID --Changing I got an Error code 1004 ( setting error)   Do I need to setup routing table? https://www.youtube.com/watch?v=PG3pEvaO4O4   i used this as a guide, but that video added a EIP card        
  17. NX102 Fins Command with PC

    Below is the multiway screen shot
  18. NX102 Fins Command with PC

    I am still unable to use the Fins Command with multiWay attached is the setting  
  19. NX102 Fins Command with PC

    "I usually use 0 for SNA for a direct network."  Do you meant without using a switch? So if I am using a switch, what is the value I should use? You need to set it up though, if you're using FINS/TCP---> How do you setup in Sysmac Studio? (prefer TCP over UDP).    
  20. NA HMI Listbox

    Thanks. As long as the Array stay the same with the index , value should be able to read but from the array instead of the Listbox0.    
  21. NA HMI Listbox

    Fritz:              There is a variable property for the Listbox, what do you specify? I think I compiled but with an error stated the setitems  is not an element  something. I will give it a try ,.   What is the listbox Memeber for selected item   ListBox0.SelectedItem.Value---> won't work   by the way VS2017 allow Campact FrameWork?
  22. NA HMI Listbox

    Fritz:              There is a variable property for the Listbox, what do you specify? I think I compiled but with an error stated the setitems  is not an element  something. I will give it a try ,.
  23. NA HMI Listbox

    This part is easy. I thought since Omron advertised about VB.Net,  Then surely first thing come to my mind...listbox and Dropbox or even Textbox should behave as such in Visual Studio? if you read the link that I post, some one posted and said he/she had been able to load it from code. Or am i read wrongly?
  24. Hi :

                 Tumpang tanya,  I came across a thread you mentioned about the listbox (which i believe base on .Net) .  May i know is it possible to add items to the listbox and combo box in runtime?

    What I know the supported member are as below

     

    IsVisible

    IsVisible

    IsEnabled

    IsEnabled

    Left

    Left

    Top

    Top

    Width

    Width

    Height

    Height

     

    So there is no "Items" . 

    If you mananged to add items (not during design time) Please help to show me how?

    I need to pass array item (specific item) to listbox and combo box.

    Thanks

    Simon

     

     

  25. Hi Micheal:

                     http://forums.mrplc.com/index.php?/topic/35762-omron-ethernet-ip-as-slave/#comment-166951

     

    Any tips on how to deal with the EDS file from Beckhoff ?