Search the Community

Showing results for tags 'unsigned word/bit string [16-bit]'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 37 results

  1. Hello, I'm new to CX-Programming and I could really use your help. I want to make function block that will check the bit status from a word input variable. I made input variable and internal variable array of bool(32) and I thought I can just use the code example: array[1]:=word.1 etc... but it is not allowed in CX-programmer. My goal is rearranging  the bits status from the input word to the output word. I don't need just making the 0 to 1 or otherwise... Thank you in advance.
  2. Hello, CJ2M CPU-32 to IAI motion controller through ethernet/ip I'm working on programming electric actuators to pick up parts from a tray. I will have x (row) and y (column) coordinates that I need to update to move the actuators. So to go through the whole tray I would have to use nested loops. (below what i'm trying to achieve if i was doing it in C++)                                           6 Rows and 6 Columns, palettizing                                           data rows&columns DWORD (Row1,row2,row3...row6; col1,col2...col6)                                           c++ code                                           for i=0,i++,i<6;                                               rowData = row                                               for i=0,i++,i<6;                                                   colData = col                                                   execute movement                                                   wait for confirmation                                               end                                           end I have a way of doing it but it will require a lot of repetitive lines and typing every step, and I was wondering if there is a way on every iteration to increment the data location instead of the contents. In the picture below you can see the example where the goal is to copy data from D8100 to D8000, then in next step from D8102 to D8000, then from D8104 to D8000 and so on. So far in the documentation I was only able to find how to increment contents. Is it even possible to do what I want to?
  3. Hi, As part of developing an EtherNet/IP driver for the CLX family, I have the task of recognising tags that would ordinarily be represented as strings. With SLC/ML, that wasn't too difficult since strings were a pre-defined type found in files with a file type of 0x8d. With CLX, I understand that the situation is quite different, since a string now becomes just another structured tag like so many others. So, for instance, in my controller, and with the help of information gleaned from the LogixTagRead program, I can see that a request sent for one particular tag (which I happen to know is a string) returns me the following information: Tag type: A0 02, followed by, Structure handle: CE 0F, followed by, Length (DINT): 1A 00 00 00, followed by, Data (Series of SINT): 41 42 43 and so on through to 58 59 5A Now in one sense I am fairly clear how to interpret most of the above data -- but in another sense, I don't believe (unless I'm missing something) that it can ever tell me that this tag should be INTERPRETED as a string. What do I mean by that ? Well, the tag type of A0 02 simply says that this tag is a structure (because the top bit is set). Even if we were to unset the top bit, the value becomes 20 02 and I'm not sure if that has significance in itself. I'm not sure if the structure handle (aka template id) of CE 0F tells me anything other than the fact that this is a symbol type of CE 8F. I know that this field can be looked up and will tell me that this structure comprises a C4 (DINT) followed by data comprising a series of C2 (SINTs) where the number of SINTs is given by the value of the DINT preceding. And, of course, this makes sense in that the DINT value of 1A 00 00 00 is decimal 26, followed by 41 42 43 ... 58 59 5A which is a 26-character string ABCDEFGHIJKLMNOPQRSTUVWXYZ. This is all correct. So whilst this LOOKS like a string, how can my code be sure that it is actually to be INTERPRETED as a string ? At the end of the day, it is only a DINT followed by a series of SINT; this doesn't of itself mean it is a string. Is there anything in the tag type or structure handle which actually identifies this as a string-type tag ? Thanks.  
  4. Working with Strings

    Hi so i am learning to work with mitsubishi GX Works2 i am using the simulator, and the help anyway i was testing with strings and when i convert a unsigned word or dword to string it converts it as HEX values and also fill the whole thing with 0's can anyone help me or point me in the right direction with a manual, i do know my way around on AB and siemens but its harder to find help for mitsubishi, on the help for WORD_TO_STR, it says it should be converting to decimal but it isnt, is this a weird bug with the simulator?    
  5. Hi guys, Is it possible to convert integers to/from strings in scripts in GT Designer3? I don't want to perform the conversion in the PLC. Thanks,
  6. i have a third party OPC server transmitting data to 1756-L73-A17 to controller derived tags that i have created in the PLC. all of these tags are working great and retriveving the raw data from the OPC. i have one tag Titled CNA_Last_Measurement_Date_Time, this raw data transmits in the form as the raw data of 43865.7090393519, but i need it to be displayed as 02/10/2020 07:05:39. i have researched all over to find a way to do this either in the PLC or on the HMI and have not found a way to convert the Datevalue numer to a date time format.  this tag changes/updates based on the last CNA measurement that was taken. does any one have a way to accomplish this via the PLC or The HMI?
  7. I am working on  calculating a checksum value for a command that is to be sent from an Allen-Bradley CompactLogix PLC to a Mass flow controller. An example of a command is the following: "@@@022SX!20.00;CHECKSUM".  1. The checksum is the sum of every characters' ASCII code value (starting from character 3).  2.Then this sum (which would be in decimal format) has to be converted to HexaDecimal 3. Finally, the last two characters of the result have to be extracted and that would be the value of the checksum.  (For Ex: the value of every individual characters' ASCII code (starting from point 3) of the above command is 715. in HexaDecimal, 715 = 2CB. So , the value of the checksum for this command would be 2CB) I got to the point where i found the sum of ASCII code. Any idea on how to convert that to  a HexaDecimal and then convert that HexaDecimal to a string so that I could concatenate it to the command string??   
  8. Good day, how can I send string data by buil-in ethernet. Maybe word 'TRIGGER,?
  9. Hello All,                 I am in the process of installing a DPM Scanner to one of our machines.  I am trying to program an ASCII String Compare to compare the scanned part number, stored in a string as ST14:0, to a constant value stored in ST15:13.  I have used this tactic before in other applications and it has worked fine every time, except this time.  Am I doing something wrong?  Is there a setting I am not aware of?  Please see the attached image.  Thanks in advance!    
  10. Barcode string parsing

    Hi all, long time reader first time poster. I am an AB programmer through and through. Recently working on more and more omron gear and need a bit of a steer in the right direction. I have a sick barcode reader communicating to a omron CP1LE PLC over serial. Problem is the value from the barcode reader is not value, it is sometimes multiple values separated by commas (,). I really wish to only have the first value before the comma in this long string stored in D200.  I take it i'll have to move this string into individual container registries which i can easily go from there and pick which one I want to use. But how do I initially go about parsing the string in CX programmer? Attached is a screenshot of what I have so far> Cheers Dave
  11. Hello everyone! Is there possibility to read words e.g. Name of alarm from the csv file or another file and save it in the PLC memory for further processing? It would be the best if the solution will matches to FX5 and IQ-R/F but it can be also for any of them. Thanks for help :)
  12. Greetings, so i create project for FX3U in GX Works2. In my program i use function in ST. That function return array with word(signed). I have a warning: ST FOR i_var := 0 TO n_i BY 1 DO TempNumbs := Numbs; TempDevSetsOnPerTime := DevSetsOnPerTime; QueueBySetOn[i_var] := 0; END_FOR; QueueBySetOn[1] := TempNumbs[n_i]; QueueBySetOn[3] := 1; FOR i_var := 0 TO n_i BY 1 DO IF (TempDevSetsOnPerTime[TempNumbs[i_var]] < MaxSetsOnPerTime) THEN QueueBySetOn[0] := TempNumbs[i_var]; QueueBySetOn[3] := 0; EXIT; END_IF; END_FOR; So, it realy funny, GXW cant return int? QueueBySetOn.gxw
  13. Hey everyone first post on here, does anyone know if it is possible to convert a string into a double integer. i am working with a dimensioner and it is sending me its box dimensions in a 12 char string (see attached picture). however i need this data as a double integer (it seems to just take the string length not the string value i have tried both dim_lengh and[0]). i have gotten it down to the point where i have the string split up into the dimensions i need but i dont know how to do the conversion. (box dims for reference are 21 X 15 X 14.8) Thanks in advance, Dr. Brule  
  14. Remote IO

    Hi friends , recently i ve been doing some diggings about remote IO cards, in my factory we have a CJ2m PLC and it communicates with remote IO cards with four numbered words (2080.00 , 2080.01, 2080.02....2080.15 ) and there were several dip switches on the IO cards, which were set but i can't understand what was the basis of that settings. So I'd like to know how these dip switches behave and what are the uses of them ?? and how is it possible to have 4 numbered word bits ?? pls help me someone to clarify this, i tried internet, but cudnt help myself !!!  thank you    Here I attach one of the pictures i took of one of the remote input cards.
  15. I am playing with sending ASCII string commands back and forth between my CP1H and another device. I learned first how to do it using ladder and now that I'm getting into more advanced stuff (parsing, searching for certain chars, converting to INT, ect) I want to do it in Structured Text because the ladder for this gets hard to follow. My very first experiment (count string length) throws an error at me: It apparent takes exception that I've use the "STRING" data type   But it this works just fine in ladder:   So am I really not allowed to use STRING data type in ST on CP1H or am I doing something wrong?
  16. Hello All, I am using Wonderware InTouch 10.0 on Windows 7. It's slightly outdated, but its what we have. I am currently writing a script using the StartApp command to open a particular PDF file with the touch of a button. My script looks like StartApp("C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32 C:\1.pdf"); The first part of the command runs adobe and the second part of the command opens the particular file "1". What I need to figure out is, how do I insert a variable into a string. For example I have 55 files I may potentially need to open up, all named 1-55. So I need the file I am calling to be a variable inside of the string so I can call it inside of a loop. I do not want to copy and paste this code 55 times, I want to make the file name a variable (tagname that is a memory real between 1 and 55) so I can run it in a loop. I have only been using Wonderware for a month or so now, so If anything is confusing feel free to ask. Thanks!
  17. RSLOGIX 500 String

    Hi, I am trying to enter a new line in a string. For example " Line 1                           Line 2"   Can this be done in rslogix 500 ?   Thanks
  18. CP1E RS232 Setup

    Hi everyone, I am fairly new here, I have a CP1E-N40DR-A And i need to send a string of data to a printer over rs232 from the built in port on the PLC, I have had a look online and canot find any information on what I need to do. all the tutorials are for CJ2 cpus ect and the instructions that I would normally use on a CJ2 dont work on CP1E PLC's. Any help or light shed would be great,  Thanks in advance
  19. ASCII Code 8 Byte In Twido

    Hey Guys!!!! I'm trying to use ASCII 8 bites in TWIDO PLC and on MOD BUS TCPIP it connected to WinCC , where I'm trying to read the ASCII in as a STRING char that to in 8bits. The problem I'm facing is that it is getting swapped like if I'm writing VA in PLC then on SCADA it is showing AV. In WinCC there is no setting for word swapping. Therefore Kindly help me for this in plc end
  20. Hey Guys!!!! I'm trying to use ASCII 8 bites in TWIDO PLC and on MOD BUS TCPIP it connected to WinCC , where I'm trying to read the ASCII in as a STRING char that to in 8bits. The problem I'm facing is that it is getting swapped like if I'm writing VA in PLC then on SCADA it is showing AV. In WinCC there is no setting for word swapping. Therefore Kindly help me for this in plc end
  21. Hi, I have variable (named var1) with data type 'Word[Unsigned]/Bit String [16-bit]' with Array [0..7]. I want to put 16 variables with data type 'bit' in var1. Is there function for that? Also is it possible to put 16 variables (bit) like this: var1[0].0:=bit1; var1[0].1:=bit2 etc. I'm using GX Works 2 with CPU L02 Best Regards
  22. Hi, I have variable (named var1) with data type 'Word[Unsigned]/Bit String [16-bit]' with Array [0..7]. I want to put 16 variables with data type 'bit' in var1. Is there function for that? Also is it possible to put 16 variables (bit) like this: var1[0].0:=bit1; var1[0].1:=bit2 etc. I'm using GX Works 2 with CPU L02 Best Regards
  23. Hi I am having trouble programming something I thought would be simple. I am using Word Lamp to display 6 different images ie. 6 states.  I have 5 Command Buttons. When pressed each one causes a different image to be loaded . What I want is the 6th image to display when the command buttons are released and before they are pressed. Unlike Bit Button which has a momentary setting , Command Button can only set a state. I wish it had a momentary feature so the state value could  be set when pressed and return to 0 when released. I hope I am being clear with what my issue is .  Any help with this would be greatly appreciated. Jim
  24. Hi, I am using syswin and i am doing an exercise on saving and moving data. My challenge is am monitoring temperature from a sensor and the range is -20'C to 100'C from the 4-20mA sensor, after conversion and testing for positive and negative the values are stored in D205. (I have done the conversion and testing for positive and negative values only assigning of bit 15 in D205 is left) The simple program has to turn on Bit 15 if the value is supposed to be negative. 1000 0000 0000 0001, a simple approach to telling us this is -1’C.  0000 0000 0000 0001, is telling us this is 1’C. Bit 15 is going to be our Sign Flag, so we have to ensure that if the temperature is positive then  Bit 15 = 0, how can we do this make Bit 15 of D205 = 0? If the temperature is negative then  Bit 15 = 1, how can we do this make Bit 15 of D205 = 1? How can i turn on this bit inside a data word? for negative i thought i could just add #8000 to the values after conversion then storing in D205 but for positive values how do i ensure that bit 15 is 0? How could you approach this? Am a bit stuck, all thoughts and ideas are much appreciated if possible you could add a snapshot from syswin or cx-programmer. I have attached the WTANK.SWP file which can be opened in syswin or cx-programmer. Look in block Main 8 Temp Buffer, Network 3 Convert to 'C WTANK.SWP
  25. PF 525 "Pos Redefine"

    Hi Everyone, I have a PowerFlex 525, in Velocity Mode with a Encoder Card "25-ENC-1". We are controlling this drive via TCP/IP with a 1769-L32. Through the PLC if I try to toggle the Bit for "Pos Redefine" in A560 [Enh Control Word] it instantly turns back to 0. But through the Parameter List Editor I am able to toggle A560. For My function I need to have the drive in Velocity Mode, If I change the drive to Position Mode I am able to toggle "Pos Redefine"   Any Thoughts would be great