Search the Community

Showing results for tags 'how to access bits in word variable in function block??'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 110 results

  1. Hello.   A colleague sent me a screenshot (attached) with a peculiar issue. An ADD function that only sends 0 as the outcome, and a DTOS function that only sends " . I have confirmed that all variables used in the ADD block are declared as integers, and both SumInt6 and String10 are not currently being modified somewhere else.  This impatient colleague is baffled, while I am just sharing this issue in the hopes that someone will eventually come with the simple answer that we are overlooking, or a complex one that we could never hope to realize by ourselves.   Thanks in advance.
  2. Unable to Monitor in GXworks2

    Hi! Anyone can help regarding this issue. I'm not able to monitor the Motor Block that I have created. there's no error either in the output screen but i'm thinking what is the cause of not running in the simulation which shows the Motor Folder RED  even it was compiled. thanks for the help!     Note: I'm new in mitsubishi.
  3. 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
  4. 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
  5. Function block self-made

    Hi, i want to make a function block which will contain a block GP.CPRTCL (for predefined comm protocol). GP.CPRTCL has an input "Un" who only receives constant (H,K). On input of my own function block i can set a constant variable, but inside block that variable isn't a constant anymore (GP.CPRTCL doesn't recognize a variable). Is there a way for receiving constant variable in GP.CPRTCL block ("Un") if it is in another block. Regards
  6. Selling the drives below. Rapid company expansion came to a halt and our vendor is not offering what we need for reimbursement. Prices shown are already wholesale rated, however, I'm open to negotiating. Numbers spaced between the model number and unit price are quantities that are being sold. Serial numbers can be provided to verify age, but these are all brand new-old stock. EMERSON M200-05400270A10101AB100 2    $      715.00 EMERSON M200-04400135A10101AB100 34    $      489.00 EMERSON M200-03400056A10101AB100 15    $      363.00 EMERSON M200-02400041A10101AB100 1    $      400.00 EMERSON M200-02400032A10101AB100 5    $      258.00 EMERSON M200-02400023A10101AB100 4    $      228.00 EMERSON M200-03400094A10101AB100 29    $      402.00 EMERSON M200-06400420A10101AB100 3    $  1,245.00 EMERSON M200-04400170A10101AB100 2    $      543.00   Inquiries can be emailed to me directly at: ryan.jorgensen@wiserg.com I'll do my best to answer any questions and have engineers on-hand to lean on for anything over my head.
  7. Beckhoff PLC Counter

    Hi everyone, I need some help with my PLC programming. I am currently using a twincat 2 software and a Beckhoff CX 8090. Basically, the gist of my program is to send and receive data and datalog the input data received from the sensors and timestamp the received data for every 1 second. I want to create a boot up counter where it will count the number of times my data logging program has restarted(if it did). This boot up counter serves as a health monitoring check to ensure that my program is running perfectly and thus, not restarting randomly when it shouldn't. I am more familiar with structured text so if you have a solution, kindly post it in structured text form. Your help would be greatly appreciated. Best regards, DeadPool
  8. Hi all Does anyone know how or the Tool to use for Exporting Variables from Unity Pro so I can remove the Register base Addressing for Various Tags and insert Direct Addressing I/O to the Alias Of Attribute for those Variables? This then to be Imported back into the project with the New Aliasing in affect. I have spoken to Tech Support and they say there is a tool (Excel Add On) that comes with V11 in a directory called Extras. I cant find the directory lol. He is coming back to me about the tool but could not tell me if this tool will help with the Aliasing I need to do. Thanks in advance for any help or ideas on this.
  9. 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
  10. Hello. I'm trying to use index addressing inside function block.  The command *D200 doesn't work. Is it necessary to use IR0, ID0,... inside function block? Thanks. Best regards
  11. Hi I have a big issue with machine user access using loggin and password. There are different levels of login (operator, maintenance and admin) locked with physical key or password. The problem is that whenever any other user sees the password or got the key he can use it later. Is there another efficient way to lock the access and may be record who is logged when and how? Thanks  
  12. I have L61 with nonvolatile memory installed. The controller will read the program from CF card on power up. The issue is that some variables are lost or not the most up to date values are read from the card since it remembers them as they were last stored on the CF card. So stuff like motor run hours, etc is not up to date. Is there any way I can update these variables or tags on the CF card as they are updated by the process? Or what would be proper way to deal with this issue?
  13. 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
  14. 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      
  15. I have 14 alarms all addressed to word 200 i.e. 200.** and i want to monitor the state of bits in word 200 such that if one of them is on the coil 204.00 should turn on (Currently i am using the OR operator to turn on bit 204.00 but the task is to use a single instruction to monitor the sate of the 16 bits of a word by comparing it to an integer say #0). I was thinking of using compare to achieve this but i do not know how to compare a word say 200 to a an integer value #0 such that if DW200>#0 then 204.00=on. How can i achieve this and what instruction can i use, am new to omron plc's and am using syswin 3.4 and plc CPM2A. Any help or sample program to achieve the above is deeply appreciated.
  16. in Citect i use the following function to associate various Tags with the next popup window, in the previous versions the tags passed to the trend fine since upgrading to 7.4 the trend pens dont display but all the values display fine.  FUNCTION // function AssPIDPopup // Expand a full set of PID tags and open // the PID block supergenie AssPIDPopUp(STRING sSGenie,STRING sBasePIDTag)     AssVarTags(-2,0,sBasePIDTag + "_PV");      AssVarTags(-2,1,sBasePIDTag + "_SP");      AssVarTags(-2,2,sBasePIDTag + "_OP");      AssVarTags(-2,3,sBasePIDTag + "_MAN");      // Now the tags for the PID tuning SG     AssVarTags(-2,4,sBasePIDTag + "_KP");      AssVarTags(-2,5,sBasePIDTag + "_KI");      AssVarTags(-2,6,sBasePIDTag + "_KD");      AssPopUp(sSGenie);      END I added a button to run the following code FUNCTION Loadtrend()     TrnSetPen(19, 1,  AssInfoEx(1,0));     TrnSetPen(19, 2,  AssInfoEx(2,0));     TrnSetPen(19, 3,  AssInfoEx(3,0));     Prompt("Test");      END     when clicked the pens set to the trend fine, i tried to run the code from a function but it did not work. i am new to citect and am sure i am missing something stupid.
  17. There are a lot of instructions in function block that are missing the enable input that is present when programming in ladder logic, such as  ADD or MOV.  It seems to be very limiting. The only way around it that I know of is to write your own function block in ladder logic or statement list and use that. I seems rather limiting of a language if it relies on other languages for it to be usable. Does anyone know why the enable bit was left out in many function blocks when it is so useful in ladder logic? Pat
  18. I'm having trouble with some very basic programming using function blocks. Specifically Connect Components FB programming, but I think it is a general, common application. Using ladder logic, it is easy to set a value based on the status of a bit. If the bit is false, move a zero into the variable. If the bit is true, move and 88.0 into the value. This relies on the enable bit of the mov instruction in ladder logic. Many function block instructions do not have enable bits. How would I change the value of a variable based on the status of a bit using function block programming? A real world example: You have a two position selector switch. If it is turned to the left, the drive runs at 0 Hz. (off) if it is to the right, it runs at 88.0 Hz. Or if you have a 4 position selector and want to select between 4 speeds. This should be a simple task, right? I've called the tech connect support line a few times and sent them a few emails and they haven't been able to figure it out. This is such a basic task. Thanks, Pat
  19. OR Word AND Word application

    Hi Im relatively new to PLC programming and focusing mainly on Siemens PLCs.  Can someone give me an example or why one would want to use OR Word (OW) and AND Word (AW).  I understand that this means it is combining the contents of accu1 and accu2.  But why would you want to OR/AND them. Thanks
  20. Dear Experts!!!   Could you please provide me the sample of "QD75MS Module & MR-J3-B program with functional block"    As you can see the page no. 3  in the attached document  "KI-Doc_QD77MSXX_MR-J3-XXBS.Zip" sample is there but i am not able to find it anywhere.   Or if you have any otherone please share it.   Please help!!! KIdoc_QD77servo_English_20130131.pdf
  21. Here is a recent post that I would like to share. Using Visual Basic 2015 we will log three holding registers from the PLC along with time and date into a Microsoft Access Database. We will log every minute into the database with the information that we collect from the PLC via Modbus TCP (Ethernet). All code will be done and shown so you can implement this in your application with different parameters. The information collected in the database can then be distributed or analyzed in the future. Visual Basic 2015 will be used with the EasyModbusTCP client/server library for .net. We will communicate to an Automation Direct – Do-More PLC. Using the free simulation software of the PLC Designer Software, we will retrieve three values of the Modbus Holding Registers using Modbus TCP. Once we have this information out of the programmable logic controller it will be placed in a Microsoft Access (2010) Database. This will be done by using a SQL command to insert the data. Read the rest of the post... Let me know what you think, Thank you Garry http://accautomation.ca/
  22. Hi there I'm an embedded software engineer mostly programming C/C++ in Linux and have very little knowledge of the PLC environment.  Recently my attention was diverted towards integrating C/C++ (Linux software) into PLC and then presumably as a function block which is supported with something called PLCOpen. Is that right ? How is multithread support in PLC in general ? and/or with the these function blocks or what ever might become instead when integrating/porting C/C++ code into PLC.  The current situation is purely embedded Linux environment with open-source 3rd party userland that our code relies heavily on. How feasible is to port such environment over to PLC (given that the system supports it) ? I've been looking into B&R Automation Studio 4 and having a hard time to establish concrete feeling on how difficult/easy it is to port the code.  Hope anyone can give me a slight insight into this.  Kind regards Einar
  23. Block Set or Block Move

    Hi:     in Omron there is a command BSET which can be used to set value from DXXXX to DXXXXn. Example BSET #0 D2000 D30000 What is the similar command in Mitsubishi FX3U structure Ladder?   thks
  24. PAROCK1 for HMI/SCADA View File Now a software solution is available for your Modbus (MB) needs in Rockwell/Allen-Bradley Control Logix or Compact Logix (Clgx) family processors, instead of a traditional 3rd party hardware like Prosoft MVI-56, Molex SST-SR4-CLX-RLL etc.  It is an Add-on instruction (AOI) for PLC/PAC firmware v16 or later, (other solutions are available for pre v16 systems).  For hardware interface, use PLC’s channel 0 (serial) or TCP/IP Interface module(s) to have as many MB TCP/IP devices or serial devices.  (Some limits apply based on system configurations, Comm. settings depending on HW used.) Connect any MB Client/Master or Server/Slave device(s) to your CLgx PLC, including flow computers, analyzers, VFDs, Power Monitors, Level gauges, Smart I/O, etc.  All the MB public/native function codes are supported.  32-Bit integers/floats as single entity are supported with byte and word level swapping. A separate utility automates the data mapping to your PLC logic.  Features -Serial Master (BASIC required Option); TCP; Slave; Redundancy; More than 5000 accumulative registers; MB CFC (Custom/Private Function Code) Support; Data mapping too – Between PAROCK1 & your PLC logic; Packaged with Rockwell; TCP/IP Interface Module; Volume Discounts; Annual Support Requirements -Rockwell/AB-CLgx processor with v16 or later.  Contact PCI for earlier versions. -If using CPU’s Chan0, you cannot use Chan0 for any other user mode activity. You can use it for non-user mode activities -TCP/IP Interface Modules from Rockwell/AB supported, are: -1756-EN2xx ControlLogix® Ethernet/IP communication modules, firmware revision 5.007 or later -1756-EWEB ControlLogix Ethernet/IP web server module, firmware revision 4.006 or later -1768-EWEB CompactLogix Ethernet/IP web server module, firmware revision 1.002 or later -1769-L30ER, 1769-L30ERM, 1769-L30ER-NSE, 1769-L33ER, 1769-L33ERM, and 1769-L36ERM CompactLogix controllers, firmware revision 20.011 or later -1769-L24ER-QB1B, 1769-L24ER-QBFC1B, 1769-L27ERM-QBFC1B CompactLogix controllers, firmware revision 20.011 or later -1769-L16ER, 1769-L18ER, 1769-L18ERM CompactLogix controllers, firmware revision 20.011 or later Other Related Services/Items -Custom PLC Add-on instructions building -PLC upgrades, troubleshooting, applications -PC Windows, iOS5, Linux, Mobile devices Comm. Drivers -Custom development, Technology Transfer Services  -Other Non-AB communication drivers for serial or TCP  -Full control system integration, training, architecture design This driver can be conviniently used with Visual Studio in development of complete large scale complex HMI/SCADA Systems. It can be used to perform advanced reporting MES, analytics, IoT, Big data type apps. One example is available to download here For More Info Overview of Parijat Drivers: Click here  Additional supporting Info about Parijat Drivers:Click here Complete Related Driver options: Click here     Submitter Scadadoctor Submitted 03/10/16 Category Other PLC Demo Software
  25. Hello, I am a student that has been taught ladder logic for three years( on many different plc's ) but, I would like to learn an alternative method is there any way to convert ladder into Function Block or some other type of programming in RS logic 5000 or any other controller? If not can some one explain the basics of Function Block programming.