Jump to content

kdcui

Members
  • Posts

    8
  • Joined

  • Last visited

About kdcui

  • Birthday 11/27/1984

Profile Information

  • Gender
    Male

Recent Profile Visitors

2,097 profile views

kdcui's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. I've noticed that I need to be careful when writing any formulas with MI operands. Depending on the order the equation is written in, the STL token list is different. If there is any division that is happening that could result in a result for that particular term to be LESS THAN 0, the 0 propagates to the result even though regular order of operations would be otherwise. For example: (A - 3277.0) * (150.0 - 0.0) / (16383.0 - 3277.0) + 0.0 If I start by typing in the divisible term first: (150.0 - 0.0) / (16383.0 - 3277.0), the result of this will be 0, because in the STL token list the division is evaluated first then get rounded down to 0 as an MI. However when I change the order I am typing, so that the first thing I write is: (A - 3277.0) * (150.0 - 0.0), Then the STL list executes a multiplication first and the scaling is correct. It took me forever to figure this out, and there is no mention of this in the manual. Is there any way to give us the ability to edit the STL tokens rather than rewrite equations? Better yet, are there any plans to just fix the way the STL is generated so it doesn't matter in what order the equation is formed? Thanks.
  2. First: My mistake, I am using a v130! I'm unsure if the failure occurs while the PLC is writing to the SD card, or if the act of reading from the SD card over Ethernet to my computer (Using SD Explorer) is causing the problem. Either way, I only discover something is wrong when I try and access the SD card via my PC. Also an interesting thing I have seen that I forgot to mention, is sometimes folders will disappear. When I originally format the SD card using the Card Manager, the Excel folder is filled with folders Excel 1, Excel 2, Excel 3, and Excel 4. Sometimes when I got online with the card in Explorer, 1 or 2 of these folders are missing. Another symptom is duplicate named files showing in the directory. I cannot delete edit or move these, and the only way to fix is to reformat. I am only writing CSV files to the root Excel folder and no other transactions are occurring. I am not emailing any data either. My PLC OS version is 3.006.14 (Jul 9 2012) with the T38 option.
  3. I seem to be having problems with SD Card Explorer. I am doing some writing to CSV in a v120. I use SD Card Explorer to intermittently grab or delete files from the SD Card remotely, as I am in the process of debugging the logging functionality I've written. Not only does SD Card Explorer seem to crash quite often, I occasionally have to reformat the card after accessing it remotely. The problems that occur are: Card become unreadable by the v120 and SD Card Explorer / PLC fails to detect an SD card in place. Duplicate files. Writing to CSV simply fails to write from the PLC. I left the PLC application logging overnight with no problems, yet when I access through SD Card Explorer the next day, after 4 or 5 transactions, the SD card needs to be reformatted. Has anyone experience similar problems? Thanks.
  4. Hi Joe, So I seemed to have figured out the answers to my questions during my debug process. My code is 90% finished, I just need to write some data logging. In case you are interested in seeing what I was trying to accomplish, here is my code. It is for lifecycle testing up to 12 valves. It logs if the valve has failed based on failure to see (or not see) flow downstream of each valve via a flowswitch. I indirectly loop through all (up to) 12 valves and store their configuration and status in bits in an MI register. During each loop I: use RLO to set or latch bits in the MI indirectly. used Test Bit to look at the status of each bit pass the output status to the output (O) register for the valve. There is a bunch of other stuff going on but those things were basically the root of my questions. Thanks for the help. Kris Valve Testing.vlp
  5. Joe, This is related to the valve program I mentioned in my other post. Basically I want the status / config of each valve to reside in an MI. However some of the logic uses bits common to each instance of the loop, and needs to do a check (read the new MI so to speak) before performing certain actions. I also like to avoid using set / reset if I can avoid it. Example (psudeocode): If VALVE OUTPUT BIT = 1 AND CLOSE CMD = 0 Then VALVE OUTPUT BIT = 1 In this case the OUTPUT BIT is a buffered output that resides in my valve word (MI). Eventually this bit will go to a corresponding O address.
  6. Thanks Joe. Ill do some playing in my 130 when I return from vacation. Kris
  7. I'm just wondering if this is valid, or if there is an easier way to do this? Let's say I have a bit in an MI that I would like to set. With an MB, I would do something such as: COMMENT: Enter Sets MB 10 MB 10 stays set until ESC is pressed SB ENTER Key MB 10 --| |------|P|----------( ) | | MB 10 SB ESC Key | --| |-----| \ |------- Would the following work with an RLO and an MI? Is there another way to accomplish this? COMMENT: Store state of MI 400 Bit 10 in MB 100 ____________ ------------| TEST BIT |---------- | | MI 400 | A C | MB 100 | | | | # 10 | B | |____________| COMMENT: Enter Key is pressed. One shots the RLO. Next scan comes around, updates MB 100 with the state of MI 400, Bit 10. MI 400 Bit 10 stays on until ESC is pressed. SB ENTER Key ______________ --| |------|P|------------------| RLO | | | | | MI 400 | A | MB 100 SB ESC Key | | | --| |-----| \ |------- | | #10 | B | |______________| Thanks.
  8. Hi all, I'm brand new to the Unitronics Vision line after about 6 years on AB ControlLogix and PLC5, so pardon what might be some "noob" questions. I couldn't find my answers after a forum search and maybe I am overlooking something in the documentation. I'm used to the relative ease of being able to indirectly address mostly anything from my PLC5 days, and I'm trying to figure out the best way to perform some similar operations in a Vision 130. I need to loop through a routine that will control 12 valves. I'm going to utilize an MI register as my loop pointer / index and loop through with a Jump / Label. I've decided to store configuration bits and buffer the valve commands into a series of MIs so that I can indirectly access a particular bit. I really have 2 questions: 1) I'd like to indirectly address the output bit for the actual valve using a register (MI) that contains my valve commands. MI 400 is my valve pointer. MI 402 is my output pointer MI:401 is my register for valve 1. Bit 0 is my output bit. Other bits in the register will correspond to other status indicators (NO / NC, Valve failure, etc...) Here is an example of how would have coded it in "Allen-Bradley parlance" using the vision naming convention. What would the equivalent be with Vision? I have a feeling it may be the Numeric to Bit vector instruction? So in this example, MI 400 = 401, and MI 402 = 1 MI [MI 400]/0 O[MI 402] ---| |---------------( ) 2) Is it possible to indirectly address a timer? I have some timers associated with each valve and I cannot find a way to start a timer indirectly. I'd like to avoid copy and pasting 12 times over. It's not too much work to directly address them but it will look nicer and fit within the loop. Thanks!
×
×
  • Create New...