MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Difool

  • Rank

Profile Information

  • Country France
  1. Hello, Is there a way to display the value of a variable into an user alarm message on a NA HMI ? For example to display the error code of a device when triggering alarm. Thanks
  2. Hello, I have a Datalogic GD4430 barcode scanner and a Omron NS5 touchscreen. When I scan a barcode that contains characters CR (0x0D) or LF (0x0A), nothing appears on the text input on the screen.Scanning a barcode that doesn't contains special characters (excepted STX and ETX) works perfectly. How to get a barcode that contain CR or LF characters ?Thanks
  3. I've finally used CTS/RTS handshake on the Zebra Printer and I've set "CTS control" to "YES" on the SCU parameters and all worked fine. I think that will be usefull for you.
  4. Hi, I have a CJ2MCPU with a SCU21-VI communication module to communicate with a ZM400 Zebra printer. I want to use TXD_SCU ST instruction I need to set the communications parameters. Does the SCU21-V1 supports the XON/XOFF handshake ? On the printer, I can set XON/XOFF (by default), DSR/DTR or RTS/CTS. What is the best to use ? How I can use XON/XOFF with SCU21-V1 ? I have not seen any of these parameters on the SCU21-V1 unit configuration on CX-Programmer. Maybe XON/XOFF flow control is used when CTS control is set to "no" ? Thanks
  5. RSRCH function

    Thank you very much ! I would be nice that the instructions not executed in simulation mode are marked (with different color).
  6. RSRCH function

    I was testing in simulation mode ... Thanks for the reply ! Does it have a list of known instructions that does not work correctly in the simulator ?
  7. RSRCH function

    Hello, I want to find a value in ten words (D7000-D7009). For that, I use the RSRCH= function. Here is the values of the control word : - D6000 : 10 (#000A) - D6001 : 1 (#0001) - D6002 : 0 (#0000) - D6003 : 0 (#0000) - D6004 : 0 (#0000) - D6005 : 0 (#0000) Here is the values of the data table (for testing) : - D7000 : 1 (#0001) - D7001 : 2 (#0002) - D7002 : 3 (#0003) - D7003 : 4 (#0004) - D7004 : 5 (#0005) - D7005 : 6 (#0006) - D7006 : 7 (#0007) - D7007 : 8 (#0008) - D7008 : 9 (#0009) - D7009 : 10 (#000A) But in the following code, the P_EQ flag stay at OFF state (and also TestFound bit). Why ? What is Wrong ? I work with a CJ2M CPU. Thanks
  8. String searching function

    Does this solution seems to be acceptable for you ? It would search for the string stored in D3000 in every 100 words from D10000 to D11000. D1000.02 become 1 if the string is not found D1000.03 become 1 if the string is found Can there be any problem with this ? I think that the P_EQ flag can be a problem maybe I can remove it ? Thanks
  9. String searching function

    Nothing is done yet. For now, we can think that it is done in 7x word blocks. Obviously there will be data related to the reference (the 14 characters long ASCII string), but it should be ignored for the moment.
  10. String searching function

    Hello, I'm working with a CJ2M CPU and I need to search for a 14 characters long ASCII string stored on the PLC memory that match with a barcode ascii string. I know that it have tracking instructions (RSRCH=, RSRCH2= and RSRCH4=) but how to do with seven-word (14 characters long ASCII string) record ? Maybe by splitting records in two four-word and verify that matching address are correct ? Any ideas would be much appreciated. Thanks
  11. Accessing bit of word

    Finally, I've found a solution to do what a want : TestCode (WORD) Reference (STRING) TankVersion (BOOL) TestCode := UINT_TO_WORD(STRING_TO_UINT(MID(Reference, LEN(Reference) - 16#7, 16#7))); IF SHR(TestCode & 2#0100000000000000, 14) = 1 THEN TankVersion := TRUE; ELSE TankVersion:= FALSE; END_IF;
  12. Accessing bit of word

    Hi guys, I have to extract a decimal value from a string (bar code) I also want to access to bits of this extracted value. String example : *ZZ00116384* Value to extract : 16384 (= 0100000000000000) For now i have the following code : TestCode := STRING_TO_WORD(MID(Reference, LEN(Reference) - 16#7, 16#7)); TankVersion := TestCode[15]; Reference is STRING(12) TestCode is WORD TankVersion is BOOL But when I compile, I have the following error : "incorrect index array" How I can do that ? Thanks !