
vds
MrPLC Member-
Content count
22 -
Joined
-
Last visited
Community Reputation
8 NeutralAbout vds
-
Rank
Sparky
Profile Information
- Country Australia
Recent Profile Visitors
-
AndrewG liked a post in a topic: ASCII !@#$!@#(*&^
-
Hello, You can assemble your command as a STRING datatype, then copy into the SINT output array to the prosoft... maybe something like this (note: assumes temperature is always 2 digits - you can extend with error handling and a few more "belts and braces" Good luck, vds
-
vds liked a post in a topic: Need some help with data comparison
-
blewl liked a post in a topic: How to modify a LINT in the program?
-
Need some help with data comparison
vds replied to kcox1980's topic in Allen Bradley / Rockwell Automation
Hello, You could consider copying the xxx:I.Data array into a string variable (be aware that the first byte is the string length!) which then exposes the ASCII String functions such as "FIND" and "MID". eg, once the data is cast into a STRING data type, you could search for the "-" (hyphens) using "FIND" and then use the located positions and feed into "MID" function to extract the string representation of the product number. The final step would be to use "STOD" instruction to convert from STRING to DINT for use in the NEQ instruction. hope this is of some help.. good luck! vds -
How to modify a LINT in the program?
vds replied to blewl's topic in Allen Bradley / Rockwell Automation
Hello, Assuming Studio5000/RSLogix5000 - you can go to the sample code library and search for "64 bit" there are instructions for handling LINT's - look for "LINT (64-bit signed 2's complement integer) Math Library" http://search.rockwellautomation.com/search?client=samplecode&oe=UTF-8&ie=UTF-8&output=xml_no_dtd&proxystylesheet=samplecode&site=sample_code&getfields=*&lang=en&hl=en&sort=date:D:L:d1&wc=200&wc_mc=1&ud=1&filter=0&q=64%20bit good luck! vds -
Hello, That should be accomplished by setting your AOI with a parameter as type InOut parameter. You should layout your program structure as follows: 1. Before any instances of your alarm AOI you should reset your global tag to 0. 2. Next, instantiate all your alarm AOIs - they should all have the global tag attached to the InOut parameter you defined - ifthe OAI detects an alarm, then the AOI sets the InOut param to value of 1. (or optionally you could give each alarm a unique ID so you know which alarm was first triggered...) 3 . AFTER all your alarm AOIs you should monitor the value of the global tag - if =1, then you have an alarm. If value is 0 then no AOI has set the value so you have no active alarms... 4. At the next PLC scan the system will perform the same operation - the important thing is to clear the global tag prior to any alarm AOI and check the global tag after all alarm AOIs have been executed... good luck! vds
-
Generic Routine to Decode data for one than one Module
vds replied to Muhammad Azeem's topic in Allen Bradley / Rockwell Automation
Hello! Yes, you should consider using an Add-on Instruction (AOI) to do what you need. You need to define "ENode:I.Data" as an InOut parameter in the AOI and "ENode_Data_Type" also as an InOut parameter since it is a UDT. Inside the AOI you will then parse the raw data into the correct format and place values into the correct location in your UDT. Once you have the AOI defined, then you will instanciate it twice, once for each of your nodes. The first instance uses "ENode:I.Data" and "ENodeData[0]" for the parameters and the second instance would use "ENode_1:I.Data" and "ENodeData[1]". Cheers! vds -
ARP-ing behaviour of an AB PLC (1756-EN3TR/B v217021900)
vds replied to MrRobotics's topic in Allen Bradley / Rockwell Automation
Hi! This is a strange issue where an older version works as expected but newer version does not... (logic changes only... hmm...) Intuition says it's not logic related but some other obscure setting such as firmware version. Get your PLC guys to check the version of Studio/RSlogix being used and see if there is a PLC firmware difference, eg Version 20 vs 21 vs 24 (check major and minor versions) etc etc... While they're at it, get them to check ethernet module versions are also configured identically between the working and non-working project - see screenshot... good luck! vds -
If you have RSLinx Gateway or Professional, you can use MS Excel with a DDE link to read N registers etc. With RSLogix 5000, there is a tool for reading and saving all tags to a CSV file but I don't remember an equivalent for SLCs. good luck! vds
-
Micrologix with 2 ethernet
vds replied to AC Electric's topic in Allen Bradley / Rockwell Automation
Hello, depending on what you are trying to do with the second Ethernet port, one option may be to use the serial port of the MicroLogix in Modbus mode (master or slave) then use an off the shelf Modbus/RTU to Modbus/TCP or EthernetIP converter to push/receive your data via Ethernet connection - your consuming/producing device would need to support the relevant protocol on the Ethernet side... there are plenty of converter/gateways eg, Moxa, ADFWeb, RedLion etc etc good luck! vds -
I politely disagree - the CTU instruction will itself look for a rising edge on the enable. The only true way to fix this is to use a short de-bounce timer - but...well ... that's an "advanced" instruction for this exercise... cheers! vds
-
-
Jobbe9000 liked a post in a topic: ASCII Comms issue
-
Oops typo on rung 5, EQU instruction should be comparing for 4 not 3...
-
ThePLCPeon liked a post in a topic: ASCII Comms issue
-
Hello, Please refer to attached sample code - sorry I don't have RS500 with me so have prepared sample in RS5000. Hopefully it is descriptive enough - is uses a state machine to shuffle along the different steps, then returns to the beginning. Regards, vds ASCII.pdf
-
vds started following ASCII Comms issue
-
Hello, It's been a long time since I've done anything ASCII related, but here are a few comments: 1. Try synchronising your reads and writes more logically in a sequence. Currently your trigger to Write is completely disassociated with the ACB and ARD. This might cause some timing issues if a write and a read execute simultaneously. You could try something like: Step 1 - issue AWT instruction. Step 2 - wait for AWT.DN bit + ?2? second delay (delay long enough for device to reply). Step 3 - perform ACB instruction Step 4 - upon ACB.DN, check buffer length >= 62 and perform the ARD instruction. Step 5 - Go back to Step 1 2. If you know your response should start with a particular pattern, you can check for that pattern using additional ASCII functions such as AEX etc - Refer to chapter 10 - http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1747-rm001_-en-p.pdf Good luck!
-
Hi! I've done this in the past by doing a tag export to CSV file to get the comments, then using an excel spreadsheet and DDE (with RSLinx) push the tag comments into the specified string tags. This is obviously a very manual thing and in my case only needed to be done once, so if you're looking for a dynamic way, then this won't do it for you.. I'm not aware of any other way to do this... Good luck! VDS
-
AndrewG liked a post in a topic: Troubles with AOI PFlex 700
-
Take a look at these discussions - you need to integrate your actual value at period interval: vds