Jump to content

Joe Tauser

MVP 2023
  • Posts

    2,859
  • Joined

  • Last visited

  • Days Won

    308

Everything posted by Joe Tauser

  1. 100 ms updates are quite fast for 9600 baud. There's a lot of overhead involved with generating a Modbus frame and the time you've selected is not realistic. My experience has been 1 second updates are about the best you can do, as you've proven. Have you tried dialing up the baud rate to 115K? Are your devices capable of it? Joe T.
  2. I did not have it. Thanks! Look at page 55. What I'm looking for is the method to determine what the actual raw database address correlation to the data table structure. I have three data tables - what is the value that gets entered into "C" - start byte of the source vector if I want to start reading blocks from the third data table? Is the data arranged in order of rows or columns? I tried getting the size of the tables from the usage dialog and guessing. I got close, but the data I retrieved had chunks of recognizable data with unknown chunks between them. This is a mystery. I wound up just biting the bullet and making a whole bunch of Read Row blocks for my long strings, but it felt clumsy. Joe T.
  3. Does anyone know the magical formula for the Data Table Read/Write actual address locations? I have three tables and I'm trying to pull a large chunk of ASCII data out of one without multiple Data Table Read Row blocks. Read Column would work, but string types are not allowed to be selected in that block. The Help says something about the Utilities section of the Visilogic manual, but it's not listed under the Utilities tree in the Help contents. Joe T.
  4. Talked to Dan at US tech support - he suggested SD File Utilities -> File Status function block The "A" output bit MB 39 does what I need. I just call this function before I write the data line to see if I have to call a another Write Line for the header first. Joe T.
  5. Unitronics uses single precision floating point- https://en.wikipedia.org/wiki/Single-precision_floating-point_format As described in the above link, once you get above 9 digits (as you show in your example) the magical exponent shift lever kicks in and knocks the number of significant digits down to 7 to allow for the exponent value. Which is why cleverly manipulated long integers are more accurate and precise than floating point in many applications. Joe T.
  6. 1) Use the Find String in String function block and search for ASCII 20h (space). Then write logic to make them enter the string again if you find it. 2) The Find function will return a pointer of the space location. You can use the Remove function to get rid of it. You may have to let the functions loop a couple of times to find all instances of a space character. Joe T.
  7. Also, I opened the file in Notepad++ and my data string is in the middle of a huge number of NUL characters. What's up with that? Creators? Joe T.
  8. Empirically confirmed that bit 2 of the status word does not come on if the file doesn't exist. If everything else is OK on the SD it just goes ahead and creates the file and writes the line. Joe T.
  9. Looked at the data sheets - all these are RS232 devices only so you'll need a port multiplexer- Google "RS232 port multiplexer". You're going to have to add code to select which port you're using. I'd also add an Ethernet card so you use the other serial port. The tricky thing is going to be your barcode reader. It just returns a string of the barcode and doesn't tell you which port it came from. This is another reason to use both ports instead of one - you'll know from the scan block which reader triggered it. Since you are using a dedicated output device (printer) and a dedicated input device (scanner) it may be possible using both ports to only connect the TX line to the printer and the RX line to the scanner using custom cables, one on port 1 and one on port 2. Use the Ethernet port for programming. This is not a trivial application. Joe T.
  10. Is there a way to tell if a file exists on an SD card before calling Write Delimited line? I want to write a header in the first line before I start filling a file with data that someone may or may not recognize. In the past I've manually triggered a Write Line that had the header text, but this seems hokey. Joe T.
  11. This is not a Modbus application. To talk to multiple serial devices you will have to use RS485. The device must be capable of having a device ID assigned to it. You will have to use the Protocol block to create the commands your device needs. For starters, do you have the make and model of the devices you want to use? Joe T.
  12. Don't use linearization display functionality. You can't access the linearized value anywhere else. If you're going to be embedding the temperature in an SMS message then you need to use the special function blocks in ladder to put the linearized value in an MI. You can put this on the display, too. +1 Joe T.
  13. You did a good job troubleshooting by taking a lot of readings to verify the problem was not in the signal. The only additional thing I would have done was put an oscilloscope on the input terminal to see if there was any noise. Swapping in a different PLC was then the next logical thing to try. The A/D converter on your module has become flaky. But you already know that Joe T.
  14. I'm guessing you're using the Data Tables Write Row function block. Do you have a program you can post? Joe T.
  15. OK, I had it backwards. I got a PLC out and loaded it up to check the operation for myself. The Reload value is a target, not a preset. The counter counts up from 0, not down from the reload value. When Reload is reached, the counter reset immediately to 0 and counts up (or down) to the reload value. The Reload Event bit (MB 1) comes on for one scan when this happens. I personally never use Reload, as I prefer to have exact control over what happens. I use compare blocks in an interrupt routine. What is it exactly that you are trying to do? Joe T. ENC1_JT1.vlp
  16. Take a look at this- https://www.petri.com/install-hebrew-on-windows-7 I didn't try it, but I'm very curious if it works. Let us know. Joe T.
  17. Reload only happens when the Reload Event is triggered - MB 1 in your case. You don't have it anywhere in your logic. Nor is the Reload Enabled (MB 2). I've attached something that may work, but not tested. Let me know if it does. Look over the Help on "Reload" again, too. Joe T. ENC1 JT.vlp
  18. That's a new one on me. Is Visilogic or Windows generating it? Screenshot? Joe T.
  19. Meir- You need to put an MI in the hardware configuration and set all the reload values that way. The accuracy is not a function of the direction. Are you turning a real output on or off when the reload event is triggered? If so, you will still run into a scan time issue. Speaking of accuracy, there is a lot more to consider- 1. How are you sensing the bar length - with a wheel? What is it's size? Can it possibly slip? 2. What is the specification on the encoder? Is it quadrature or single channel? 3. Are you trying to cut the bar? What is the response time of the shear? How much does the material move when you try to cut it? So often people post here and pick on the "accuracy" of the PLC when actually their machine is not capable of doing what they want. All the PLC can do is read pulses and react in about 2 milliseconds under the best of circumstances. It's up to you to provide the rest of the physical ability to get the "accuracy" you are looking for. Joe T.
  20. It's always good to try your hand at writing logic and then post your code with questions. Often we can make some tweaks to make it work. Joe T.
  21. Looked at your code. You're using Immediate inputs but not the high-speed Interrupt routine - go look at the Help on how to do that. It will be faster. The Counter Target Value can be an MI or an ML. I would write some code to load it with the value you want as opposed to hard coding it. The bits triggered by the HSC hardware will be a bit faster, but you still have to write code to interpret them. Once again, look at the high-speed interrupt routine. Joe T.
  22. You can set the time using Info Mode on the PLC or in Visilogic use Connection->Communication & OS-> 2nd tab "Set RTC" button to synchronize the PLC with your computer. Joe T.
  23. I've used I/O repeaters before, but none of them are physically small. Here's an example: http://www.dutec.net/dsrepeater.htm Then I Googled "trendy thermostat". This is one of the images that came up: Hope that doesn't happen. Joe T.
  24. Wacky timer presets is a sign the memory was corrupted. Make sure your battery is OK, and that you have the latest OS installed. There may be something in your collective email code that's getting out of the memory sandbox. Are you doing Modbus TCP or talking to the PLC with a custom program in this application? Either one of these scenarios has the ability to screw the RAM up with un-intended values. Joe T.
×
×
  • Create New...