-
Topics
-
Who's Online (See full list)
-
Posts
-
By Joe Tauser · Posted
If you're getting a -1 in MI 282 then something is happening. The block just doesn't know what to do with the incoming stream. If you're using Ethernet then COM 1 will be dedicated to your SCAN block. DanT describes using Info Mode to look at the serial buffer. Do this. Upload your program so we can see exactly what you're doing. Joe T. -
Hi; The Data from the Scale is being sent as an ASCII String ( Not an actual Number - ML or MI) In Info Mode in the PLC, look at the Serial Port Monitor and see what the data being received there looks like. Receive as a Stream of Vector Length 3 ( convert 2 Bytes to Linked Element(MI) ) with the CR,LF as the End of Text(EOF)( Length 2) Make sure the 4th MI is set to 0x00 NULL >> 12 34 56 0x00 (Note: You can look at the MI's On Line in HEX Format - easy read for ASCII Data) THEN convert the ACSII String to an ML in the ladder. >> Strings ASCII to Num ( Have an ASCII Table handy ! ) DanT
-
Hi; For the HMI Under Text, List of texts Create an Indexed List and call them by the FaultCode ( int 32) ( your switch case index ) in the program ( FaultCode being what ever name you choose ) In the Ladder - Use the Compare = to Set the Fault Code to the Fault number or -- this one is neet -- Under Solution explorer use the Switch Case and set up the FaultCode to the List of Texts There is a lot of flexibility in this function - Fixed compares and ranges with Options for Actions Example : Case ID 1 , Name Case 1, Comparison Type - Value , From #1 ( a Constant), To (Blank) , Action (Store Tag) , Tag (FaultCode) Store into Tag ( #1 a Constant) DanT
-
Hi Joe, Thanks for the tips and help. However, I still have no communication. Just getting error -1. I tried exchanging the MI for an ML and it didn't solve. Then I tried using exactly the configuration you presented (stream with vector and with termination after 10mS) and other similar settings, such as 1 byte for a link, and none has worked yet. It may be that the problem lies elsewhere. The memory tab shows no value, even after online. It's normal? Could I be sending something wrong through the serial emulator? I am just using the "send" field and putting a number directly. (see the image) Perhaps it would not be necessary for me to be using the message structure as shown in the attached image? For example, could the absence of STX and ETX be causing this failure? Or is it that the presence of the configured ethernet must not be disturbing COM 1? I am using ethernet to program and monitor the PLC. Will serial port 1 on the PLC always be linked to COM 1? Thanks for the Help.. Fábio
-
I want to store a specific string (read fixed) to a "string tag" according a value. If value = 1, then string should be "OK" - value = 2, string is "NOT OK", value = 3, string is "FAULT...",.... OK, I know I can do this with the compare instructions, but I want to do this with the switch case instruction....😎 suggestions anybody ?
-
-
Blog Entries