Link068

MrPLC Member
  • Content count

    10
  • Joined

  • Last visited

Posts posted by Link068


  1. Hello Everybody,

    I continued to work on project this morning but I seem to be plagued with the "PLC No Response" error. This error will only come up when I assign a PLC address to a particular object. 

    614545f5758a3_MicrosoftTeams-image(44).t

    I have followed the steps in the post(https://forums.mrplc.com/index.php?/topic/39885-nb-designer-hmi-plc-no-response-error-solved/) to try and clear the error but am having no luck.

    In the screenshot I have assigned the large "Start Process" as a bit button with the write address being W50.00. When the button is pressed it should trigger a bit in the PLC but this is when the error appears. During this test I am connected to the PLC and in run mode with the PLC and HMI address assigned correctly. I have read and followed the section in the manual regarding "PLC No Response" but still no positive results. 

    I just want to check that there is nothing I have done at a programmer end that could cause these issues. I am happy to provide files.

    Thanks,

    Ryan

     


  2. 3 hours ago, BobB said:

    You can use a mask - then shift bits around to put them where you want. ANDW #00FF A352 D2000 will move hours into D2000.

    ANDW #FF00 A351 D2001 will move I think it is minutes into D2001. They will be on the left of the word. MOVD D2001 #12 D2002 will move the value to the right had side of the word.

    Hope this is what you require.

    thank you for that but in the MOVD why just #12? wouldn't it need 4 variables? 

     


  3. 7 hours ago, Crossbow said:

    Be careful with your moves... clock data is in BCD, not integer. 

    I would swear there is a command that can copy digits from one register into another, but I cannot think of it right now.  It's been a while since I worked in CX-Programmer, mostly use Sysmac Studio anymore...

    I think the move you are thinking of is MOVD, but that moves 4 bits but aren’t the tine data stored in 8 bits?


  4. On 9/9/2021 at 3:33 AM, Crossbow said:

    PLC time is stored into registers in the controller, I don't have the list handy.  But you would simply do a compare to those registers in your code.

    I am trying to compare time entered via an HMI and compare with the internal PLC clock. I Have broken it down to entered YY:MM:DD:HH:MIN to match the registers. 

    So if I understand this correctly they are 16 bits with each variable broken into 8 bits.

    6141af4a35e59_TimeRegisters.jpg.6479ea54

    So to compare (as example) I want to have YY & MM together so they can be compared A353 register and set a bit true when they are the same. 

    Since YY & MM are entered individually in HMI as INT, I need to but them together in one word using the XFRB block so they can match the A353 register.

    6141b38cab56c_XFRBDescription.jpg.5dd115

    I believe I am using this correctly but I can't seem to move the YY values into the register I want. The MM moves but not the year so I just want to be sure I am using this block control word correctly. 

    So first 2 digits are the number of bits (anything between 1 or 15 bits), 3rd digit is the start position of where you want to store the 8 bit value (in my YY example is position 8 as a word has 16 bits, so this would cover position 8-15) and the last bit is the start position of the number of bits you want from the source word. 

    MY example 

    6141b43dc1301_MoveUsingXFRB.jpg.40ad4ca9

     

    If I can have any help or if you can offer a netter cleaner way of doing it please let me know.

    Thanks,

    Ryan

    Move Using XFRB.jpg


  5. Good Afternoon All,

    Just wondering if anyone would have any example code of using the Data Logging on NB designer? I am wanting to use a PID controller and display set point and process variable etc. I have looked in the manual but a coded example would be extremely helpful. 

     

    Hope you have a good weekend.

    Thanks


  6. Good Afternoon,

    I am wanting to do two things with and ORMON PLC and HMI with CX-Programmer and NB-Designer.

    1. I want to display the current time from PLC on HMI with the real time clock.

    2. I want to be able to enter a time on the HMI which will be compared to the PLC time and will stop a process when when the entered time is equal to the actual PLC time. 

    If I can have some help with this that would be a great help.

    Thanks,


  7. Good Afternoon,

    I am new to CX-Programmer so excuse this question. 

    I have written a FB in ST to trigger BOOL and Integer variables. Within the FB I have written ST with a case statement which is working correctly. The issue I am having is that It seems the integer variables in the FB (HMI_Q_FAN_STATUS) are not being passed to the assigned global variable (assigned to D register) on the output of the FB. 

    In the attached screen shot, the FB is in case 3 therefore the integer variable should display HMI_Q_FAN_STATUS=3, however is still displaying 0.

    Any help with this would be great.

    Thanks and have a good day.

     

    Image.jpg